-
Notifications
You must be signed in to change notification settings - Fork 0
chore: migrate backend package management from pnpm to npm #1
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 |
|---|---|---|
|
|
@@ -55,25 +55,23 @@ jobs: | |
| with: | ||
| node-version: 22 | ||
|
|
||
| - uses: pnpm/action-setup@v6.0.8 | ||
|
|
||
| - run: pnpm install | ||
| - run: npm ci | ||
|
|
||
| - name: Backend lint | ||
| id: backend_lint | ||
| continue-on-error: true | ||
| run: cd apps/backend && pnpm eslint ${{ needs.detect-changes.outputs.backendFiles }} | ||
| run: cd apps/backend && npx eslint ${{ needs.detect-changes.outputs.backendFiles }} | ||
|
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. P0: Command injection vulnerability: Pass the value through an environment variable instead: - name: Backend lint
id: backend_lint
continue-on-error: true
env:
BACKEND_FILES: ${{ needs.detect-changes.outputs.backendFiles }}
run: cd apps/backend && npx eslint $BACKEND_FILESThe same issue applies to Prompt for AI agentsThe same issue applies to </file context> |
||
|
|
||
| - name: Backend test | ||
| id: backend_test | ||
| if: needs.detect-changes.outputs.backendTestFiles != '' | ||
| continue-on-error: true | ||
| run: cd apps/backend && pnpm test --passWithNoTests ${{ needs.detect-changes.outputs.backendTestFiles }} | ||
| run: cd apps/backend && npm test -- --passWithNoTests ${{ needs.detect-changes.outputs.backendTestFiles }} | ||
|
|
||
| - name: Backend typecheck | ||
| id: backend_typecheck | ||
| continue-on-error: true | ||
| run: cd apps/backend && pnpm typecheck | ||
| run: cd apps/backend && npm run typecheck | ||
|
|
||
| - name: Fail job if any check failed | ||
| if: > | ||
|
|
@@ -100,19 +98,17 @@ jobs: | |
| with: | ||
| node-version: 22 | ||
|
|
||
| - uses: pnpm/action-setup@v6.0.8 | ||
|
|
||
| - run: pnpm install | ||
| - run: npm ci | ||
|
|
||
| - name: Web check | ||
| id: web_check | ||
| continue-on-error: true | ||
| run: cd apps/web && pnpm check | ||
| run: cd apps/web && npm run lint | ||
|
|
||
| - name: Web build | ||
| id: web_build | ||
| continue-on-error: true | ||
| run: cd apps/web && pnpm build | ||
| run: cd apps/web && npm run build | ||
|
|
||
| - name: Fail job if any check failed | ||
| if: > | ||
|
|
@@ -138,20 +134,18 @@ jobs: | |
| with: | ||
| node-version: 22 | ||
|
|
||
| - uses: pnpm/action-setup@v6.0.8 | ||
|
|
||
| - run: pnpm install | ||
| - run: npm ci | ||
|
|
||
| - name: Mobile lint | ||
| id: mobile_lint | ||
| continue-on-error: true | ||
| run: cd apps/mobile && pnpm eslint ${{ needs.detect-changes.outputs.mobileFiles }} | ||
| run: cd apps/mobile && npx eslint ${{ needs.detect-changes.outputs.mobileFiles }} | ||
|
|
||
| - name: Mobile test | ||
| id: mobile_test | ||
| if: needs.detect-changes.outputs.mobileTestFiles != '' | ||
| continue-on-error: true | ||
| run: cd apps/mobile && pnpm test --passWithNoTests ${{ needs.detect-changes.outputs.mobileTestFiles }} | ||
| run: cd apps/mobile && npm test -- --passWithNoTests ${{ needs.detect-changes.outputs.mobileTestFiles }} | ||
|
|
||
| - name: Fail job if any check failed | ||
| if: > | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,5 @@ coverage/ | |
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| pnpm-debug.log* | ||
| .cache/ | ||
| tmp/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ logs | |
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
|
|
||
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.
Command injection via
${{ ... }}expansion of PR-controlled filenames.backendFiles,backendTestFiles,mobileFiles, andmobileTestFilesare derived from the PR's changed file paths and are interpolated directly intorun:shell strings. A filename containing shell metacharacters (e.g.$(...),;, backticks) executes arbitrary commands on the runner. This is amplified because the workflow usespull_request_targetwithpull-requests: write, so injected code runs in a privileged context with access toGITHUB_TOKEN. Pass the values throughenv:and reference quoted shell variables instead of inline expansion.🔒 Example mitigation (apply to each affected step)
- name: Backend lint id: backend_lint continue-on-error: true - run: cd apps/backend && npx eslint ${{ needs.detect-changes.outputs.backendFiles }} + env: + BACKEND_FILES: ${{ needs.detect-changes.outputs.backendFiles }} + run: cd apps/backend && npx eslint $BACKEND_FILESAlso applies to: 69-69, 142-142, 148-148
🧰 Tools
🪛 zizmor (1.25.2)
[info] 63-63: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
🤖 Prompt for AI Agents