diff --git a/.github/workflows/license-compliance.yml b/.github/workflows/license-compliance.yml new file mode 100644 index 00000000..edc75353 --- /dev/null +++ b/.github/workflows/license-compliance.yml @@ -0,0 +1,45 @@ +name: License & Dependency Compliance + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +jobs: + license-check: + name: License Compliance Audit + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + pip-licenses + run: | + python -m pip install --upgrade pip + pip install -e . + pip install pip-licenses + + - name: Generate License Inventory Report + run: | + pip-licenses --ignore-packages agent-alpha pip-licenses PTable --format=markdown + + - name: Fail on Disallowed Viral/Copyleft Licenses (AGPL/SSPL) + run: | + pip-licenses --ignore-packages agent-alpha pip-licenses PTable --fail-on="AGPL;GNU Affero;Server Side Public License" diff --git a/.github/workflows/osv-scanner.yml b/.github/workflows/osv-scanner.yml new file mode 100644 index 00000000..7e06f65c --- /dev/null +++ b/.github/workflows/osv-scanner.yml @@ -0,0 +1,36 @@ +name: Supply Chain Security (OSV-Scanner) + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '0 3 * * 1' # Weekly on Monday at 03:00 UTC + workflow_dispatch: + +permissions: + contents: read + +jobs: + osv-scan: + name: OSV-Scanner + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Run OSV-Scanner + uses: google/osv-scanner-action/osv-scanner-action@v1.9.2 + with: + scan-args: |- + --lockfile=pyproject.toml + --recursive + . diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml new file mode 100644 index 00000000..1532c236 --- /dev/null +++ b/.github/workflows/semantic-pr.yml @@ -0,0 +1,38 @@ +name: Semantic PR Linter + +on: + pull_request: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read + statuses: write + +jobs: + validate-pr-title: + name: Validate PR Title + runs-on: ubuntu-latest + steps: + - name: Validate PR Title Format + uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + requireScope: false + validateSingleCommit: false