-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add PR-triggered CI workflow #44
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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||||||||
| name: CI | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| push: | ||||||||||
| branches: [main] | ||||||||||
| pull_request: | ||||||||||
| branches: [main] | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| test: | ||||||||||
| name: Test | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| strategy: | ||||||||||
| matrix: | ||||||||||
| node-version: [22.x, 24.x] | ||||||||||
|
|
||||||||||
| steps: | ||||||||||
| - name: Checkout | ||||||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||||||
|
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: sed -n '1,80p' .github/workflows/ci.ymlRepository: WYRE-AI/node-spanning Length of output: 1114 Sensitive Data Exposure (CWE-522): Insufficiently Protected Credentials Reachability: External · Exploitability: Moderate Disable checkout credential persistence for the PR test job. The workflow executes repository-controlled npm scripts after checkout and does not require authenticated Git operations. Add Proposed fix - name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.29.0)[warning] 18-19: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [warning] 10-41: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||
|
|
||||||||||
| - name: Setup Node.js ${{ matrix.node-version }} | ||||||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||||||
| with: | ||||||||||
| node-version: ${{ matrix.node-version }} | ||||||||||
|
|
||||||||||
| - name: Install dependencies | ||||||||||
| run: npm ci | ||||||||||
|
|
||||||||||
| # NOTE: `npm run lint` is omitted — the repo has a legacy .eslintrc.cjs | ||||||||||
| # with ESLint >=9 installed, so eslint exits 2 until the config is | ||||||||||
| # migrated to eslint.config.*. Type checking still runs below. | ||||||||||
|
|
||||||||||
| - name: Run type check | ||||||||||
| run: npm run typecheck | ||||||||||
|
|
||||||||||
| - name: Build | ||||||||||
| run: npm run build | ||||||||||
|
|
||||||||||
| - name: Run tests | ||||||||||
| run: npm test | ||||||||||
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
🧩 Analysis chain
🏁 Script executed:
sed -n '1,80p' .github/workflows/ci.ymlRepository: WYRE-AI/node-spanning
Length of output: 1114
Security Misconfiguration (CWE-732): Incorrect Permission Assignment for Critical Resource
Reachability: External
Declare read-only
GITHUB_TOKENpermissions.This workflow runs pull-request-controlled code without an explicit permission scope. Add
contents: readso the job does not inherit broader repository or organization defaults.Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.29.0)
[warning] 10-41: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents
Source: Linters/SAST tools