-
Notifications
You must be signed in to change notification settings - Fork 21
Update dependencies #67
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -14,6 +14,28 @@ env: | |
| NODE_VERSION: "lts/*" | ||
|
|
||
| jobs: | ||
| audit: | ||
| name: 🔍 Security Audit | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: 📥 Checkout Code | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: ⚙️ Set up Node.js | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: 📦 Set up pnpm | ||
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 | ||
| with: | ||
| version: latest | ||
| run_install: false | ||
|
Comment on lines
+30
to
+34
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. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 2 '"packageManager"|"pnpm"|PNPM_VERSION' \
package.json pnpm-workspace.yaml .github/workflows/pr-builder.yml .github/workflows/release.yml 2>/dev/null || trueRepository: thunder-id/javascript-sdks Length of output: 361 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/pr-builder.yml | sed -n '1,80p'
printf '%s\n' '--- declared version ---'
python3 - <<'PY'
import json
from pathlib import Path
package = json.loads(Path("package.json").read_text())
declared = package.get("devEngines", {}).get("packageManager", {})
print(declared)
PY
printf '%s\n' '--- version consistency ---'
python3 - <<'PY'
import json
from pathlib import Path
workflow = Path(".github/workflows/pr-builder.yml").read_text()
package = json.loads(Path("package.json").read_text())
declared = package["devEngines"]["packageManager"]["version"]
print(f'workflow_uses_latest={\'version: latest\' in workflow}')
print(f'declared_pnpm_version={declared}')
PYRepository: thunder-id/javascript-sdks Length of output: 3441 Use the declared pnpm version Set 🤖 Prompt for AI Agents |
||
|
|
||
| - name: 🔍 Run pnpm audit | ||
| run: pnpm audit --audit-level=high | ||
|
|
||
| dependency-review: | ||
| name: 🔎 Dependency Review | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Restrict the audit job token and disable credential persistence.
This job uses default
GITHUB_TOKENpermissions.actions/checkoutalso persists the token by default.pnpm auditonly needs repository read access. Setpermissions: contents: readfor this job and setpersist-credentials: falseon checkout.Proposed fix
audit: name: 🔍 Security Audit + permissions: + contents: read runs-on: ubuntu-latest @@ - name: 📥 Checkout Code uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.29.0)
[warning] 22-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[warning] 17-37: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents
Source: Linters/SAST tools