Repository navigation
root - chore: defense - gate releases with Aikido #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,20 +7,60 @@ on: | |
|
|
||
| permissions: | ||
| contents: read | ||
| # Required for npm trusted publishing (OIDC) and provenance attestations | ||
| id-token: write | ||
|
|
||
| env: | ||
| HYPHEN_PUBLIC_API_KEY: ${{ secrets.HYPHEN_PUBLIC_API_KEY }} | ||
| HYPHEN_API_KEY: ${{ secrets.HYPHEN_API_KEY }} | ||
| HYPHEN_APPLICATION_ID: ${{ secrets.HYPHEN_APPLICATION_ID }} | ||
| HYPHEN_ORGANIZATION_ID: ${{ secrets.HYPHEN_ORGANIZATION_ID }} | ||
| HYPHEN_LINK_DOMAIN: ${{ secrets.HYPHEN_LINK_DOMAIN }} | ||
|
|
||
| jobs: | ||
| aikido-gate: | ||
| runs-on: ubuntu-latest | ||
| # A stalled scan stops after 15 minutes. | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Install Socket Firewall | ||
| uses: SocketDev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2 | ||
| with: | ||
| mode: firewall-free | ||
| firewall-version: "1.15.4" | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | ||
| with: | ||
| node-version: 22 | ||
| package-manager-cache: false | ||
|
|
||
| - name: Install Aikido CI client | ||
| # zizmor: ignore[adhoc-packages] pinned Aikido CI client for the release gate | ||
| run: sfw npm install --global @aikidosec/ci-api-client@1.0.17 | ||
|
|
||
| - name: Run Aikido release scan | ||
| # The scan fails when Aikido reports a new finding at severity LOW or above. | ||
| # The API key comes from the Aikido CI settings. | ||
| # The key cannot publish a package. | ||
| env: | ||
| REPO_NAME: ${{ github.event.repository.name }} | ||
| AIKIDO_CLIENT_API_KEY: ${{ secrets.AIKIDO_CLIENT_API_KEY }} | ||
| run: > | ||
| aikido-api-client scan-release | ||
| "$REPO_NAME" "$GITHUB_SHA" | ||
| --apikey "$AIKIDO_CLIENT_API_KEY" | ||
| --fail-on-sast-scan --fail-on-iac-scan --fail-on-secrets-scan | ||
|
Comment on lines
+43
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an Aikido scan stays pending, this command has no scan or job timeout. The CLI offers only a poll interval, and GitHub applies a 360-minute default. Add Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commit 51cb2e6 adds There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the default Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commit 51cb2e6 adds |
||
| --minimum-severity-level LOW | ||
|
|
||
| build: | ||
| needs: [aikido-gate] | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| # OIDC lets this job stage the package. | ||
| id-token: write | ||
|
|
||
| env: | ||
| HYPHEN_PUBLIC_API_KEY: ${{ secrets.HYPHEN_PUBLIC_API_KEY }} | ||
| HYPHEN_API_KEY: ${{ secrets.HYPHEN_API_KEY }} | ||
| HYPHEN_APPLICATION_ID: ${{ secrets.HYPHEN_APPLICATION_ID }} | ||
| HYPHEN_ORGANIZATION_ID: ${{ secrets.HYPHEN_ORGANIZATION_ID }} | ||
| HYPHEN_LINK_DOMAIN: ${{ secrets.HYPHEN_LINK_DOMAIN }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,15 +38,15 @@ Profile: npm library · public | |
|
|
||
| ## 5. npm publishing — npm libraries only | ||
| - [ ] OIDC trusted publishing configured **stage-only** on npmjs.com for the publish workflow — it can stage, never publish live (manual) | ||
| - [ ] `.github/workflows/release.yaml` packs then stages with `pnpm stage publish ./packed/*.tgz --no-git-checks` (PR #170 pending) | ||
| - [x] `.github/workflows/release.yaml` packs then stages with `pnpm stage publish ./packed/*.tgz --no-git-checks` — PR #170 | ||
| - [ ] Maintainer promotes staged versions with 2FA (manual) | ||
| - [ ] Drydock connected — staged releases reviewed before promotion (manual) | ||
| - [ ] No direct publish rights: package requires 2FA and disallows tokens (manual) | ||
| - [x] `package.json` `repository.url` accurate so provenance maps to this repo — verified 2026-10-08 | ||
|
|
||
| ## 6. Security tooling | ||
| - [x] Aikido runs on every build — verified 2026-10-08 | ||
| - [ ] Aikido release gate: the release workflow's stage-publish job `needs:` a passing `scan-release` | ||
| - [ ] Aikido release gate: the release workflow's stage-publish job `needs:` a passing `scan-release` (PR #171 pending) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pull request title and description indicate that the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - [ ] Socket reviews every PR that changes dependencies | ||
|
|
||
| ## 7. Repository lockdown | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This release job uses
npmto install the client. The repository requirespnpmfor all package management commands. Add pnpm and use it here.AGENTS.md reference: AGENTS.md:L3-L3
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 33 keeps
sfw npm install --global @aikidosec/ci-api-client@1.0.17.The skill template uses that command.
The Aikido install guide uses the same npm command.
setup-nodeputs that global binary on PATH.pnpm bin -greturns an empty path here, so a global pnpm install can omit the client from PATH.