|
64 | 64 | type: boolean |
65 | 65 | required: false |
66 | 66 | default: true |
| 67 | + enable-vet: |
| 68 | + description: > |
| 69 | + Run safedep/vet OSS dependency policy scan against the caller repo's |
| 70 | + .github/vet/policy.yml + .github/vet/exceptions.yml. Off by default; |
| 71 | + soft-launch (non-blocking) until exceptions are seeded. |
| 72 | + type: boolean |
| 73 | + required: false |
| 74 | + default: false |
67 | 75 | submodules: |
68 | 76 | description: > |
69 | 77 | Checkout submodules for the CodeQL job (autobuild may need them). |
|
86 | 94 | SNYK_TOKEN: |
87 | 95 | description: Snyk token. Used only when enable-snyk is true. |
88 | 96 | required: false |
| 97 | + SAFEDEP_CLOUD_KEY: |
| 98 | + description: SafeDep Cloud API key (optional; malware/zero-day analysis). Used only when enable-vet is true. |
| 99 | + required: false |
| 100 | + SAFEDEP_CLOUD_TENANT: |
| 101 | + description: SafeDep Cloud tenant. Used only when enable-vet is true. |
| 102 | + required: false |
89 | 103 |
|
90 | 104 | permissions: |
91 | 105 | contents: read |
92 | 106 | security-events: write # CodeQL + SARIF uploads |
93 | 107 | pull-requests: read # dependency-review |
94 | 108 |
|
95 | 109 | jobs: |
| 110 | + # ── safedep/vet — OSS Dependency Policy ─────────────────────────────────── |
| 111 | + # Malware (MAL-), critical/high vulns, license allowlist (npm/PyPI/NuGet), |
| 112 | + # OpenSSF Scorecard maintenance/dangerous-workflow, popularity floor — gated |
| 113 | + # by the caller's .github/vet/policy.yml. Soft-launch: non-blocking until the |
| 114 | + # caller seeds .github/vet/exceptions.yml and promotes vet to a required check. |
| 115 | + vet: |
| 116 | + name: vet (OSS dependency policy) |
| 117 | + if: ${{ inputs.enable-vet }} |
| 118 | + runs-on: ubuntu-latest |
| 119 | + permissions: |
| 120 | + contents: read |
| 121 | + pull-requests: write # inline PR comments on changed deps |
| 122 | + issues: write |
| 123 | + steps: |
| 124 | + - name: Harden Runner |
| 125 | + uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2 |
| 126 | + with: |
| 127 | + egress-policy: audit |
| 128 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 129 | + - name: Run safedep/vet |
| 130 | + uses: safedep/vet-action@6247cccd1b6683a27946ea3a0d45d3865346918b # v1.1.12 |
| 131 | + with: |
| 132 | + policy: .github/vet/policy.yml |
| 133 | + exception-file: .github/vet/exceptions.yml |
| 134 | + exclude: "**/vendor/**, .cargo/**, **/node_modules/**, **/target/**, .worktrees/**" |
| 135 | + trusted-registries: "https://crates.io,https://registry.npmjs.org,https://pypi.org,https://api.nuget.org" |
| 136 | + upload-sarif: false # private repos w/o GHAS — use step summary |
| 137 | + cloud-key: ${{ secrets.SAFEDEP_CLOUD_KEY }} |
| 138 | + cloud-tenant: ${{ secrets.SAFEDEP_CLOUD_TENANT }} |
| 139 | + continue-on-error: true # SOFT-LAUNCH: warn-only until promoted to required |
| 140 | + |
96 | 141 | # ── CodeQL ──────────────────────────────────────────────────────────────── |
97 | 142 | # CodeQL is handled by GitHub's repo-level "default setup" (Settings → |
98 | 143 | # Code security → CodeQL analysis). Running a matrix job here conflicts |
|
0 commit comments