Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Feature/frontend cicd#11

Closed
ik-alex wants to merge 5 commits into
devfrom
feature/frontend-cicd
Closed

Feature/frontend cicd#11
ik-alex wants to merge 5 commits into
devfrom
feature/frontend-cicd

Conversation

@ik-alex

@ik-alex ik-alex commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR for FE cd and fixing the ci syntax

Changes Proposed

What were you told to do?

What did you do?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (changes that do not relate to a fix or feature and don't modify src or test files)

Check List

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR are clear and explain the approach.
  • I am making a pull request against the dev branch (left side).
  • My commit message style matches our requested structure.
  • My code additions will not fail code linting checks or unit tests.
  • I am only making changes to files I was requested to.

Images

  • The live component worked on
  • Linting check (run pnpm lint)

Summary by CodeRabbit

  • Chores
    • Strengthened deployment automation across development, staging, and production environments
    • Enhanced continuous integration pipeline with security scanning and dependency audit checks
    • Optimized build configuration for improved reliability

Review Change Stack

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@ik-alex has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 12 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b3e05b11-b411-4b69-900c-f87cdbd175fb

📥 Commits

Reviewing files that changed from the base of the PR and between 49a4c01 and 1c7c5d3.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

This PR introduces CI/CD infrastructure: a new CD pipeline for deploying to dev/staging/production environments via SSH and PM2, updates the CI workflow with shared environment variables and new security scanning jobs, and configures the PNPM workspace to manage build restrictions for specific dependencies.

Changes

CI Pipeline Enhancement

Layer / File(s) Summary
Workflow Configuration
.github/workflows/ci.yml
Workflow trigger expanded to push (dev/staging/main) and pull_request; global env defines NODE_VERSION: 20 and PNPM_VERSION: 9 for reuse.
Existing Job Updates
.github/workflows/ci.yml
Lint, typecheck, and build jobs updated to use actions/checkout@v4, pnpm/action-setup@v4, node-version: ${{ env.NODE_VERSION }}, and cache: "pnpm"; build job name changed to "Build".
Security and Audit Jobs
.github/workflows/ci.yml
New audit job runs pnpm audit --audit-level=moderate; new trivy job scans filesystem and uploads SARIF results to GitHub Security via upload-sarif@v2 with if: always().

CD Deployment Pipeline

Layer / File(s) Summary
Deployment Workflow Setup
.github/workflows/cd.yml
New "Frontend CD" workflow triggers on push to dev/staging/main; global env defines NODE_VERSION: 20 and PNPM_VERSION: 9.
Environment-Specific Deploy Jobs
.github/workflows/cd.yml
Three parallel jobs deploy-dev, deploy-staging, and deploy-prod each gated to corresponding branch and GitHub environment; each job SSH deploys to a server, exports environment/auth variables, installs with frozen-lockfile, builds, and manages PM2 process (reload with --update-env if exists, start if new).

Workspace Configuration

Layer / File(s) Summary
Workspace Structure and Build Policy
pnpm-workspace.yaml
Workspace packages includes repository root ("."); allowBuilds disables builds for msw, sharp, and unrs-resolver; ignoredBuiltDependencies marks sharp and unrs-resolver as pre-built.

Possibly related PRs

  • hngprojects/skillbridge-fe#4: Introduces the initial CI workflow that this PR directly updates with new env variables, security jobs, and expanded triggers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Feature/frontend cicd' is vague and uses a generic naming convention rather than describing the actual changes. It lacks specificity about what was implemented. Use a more descriptive title that explains the main changes, such as 'Add GitHub Actions CI/CD pipeline with security scanning' or 'Set up frontend deployment workflows with Trivy security integration'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/frontend-cicd

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/cd.yml:
- Around line 54-55: The workflow currently hardcodes NODE_ENV to "production"
by using "export NODE_ENV=production" (also duplicated later), which forces
dev/staging jobs into prod mode; remove the hardcoded export or replace it with
a dynamic/job-level value (e.g. export NODE_ENV=${{ env.NODE_ENV }} or simply
omit export so the job's NODE_ENV is inherited) and keep the PORT export if
needed (export PORT=3000) — update both occurrences where "export
NODE_ENV=production" appears.
- Around line 40-43: The deploy workflow is bypassing host verification by using
"StrictHostKeyChecking=no" in the ssh invocation and swallowing ssh-keyscan
errors with "|| true"; update the deploy step so the host key is reliably
installed and SSH fails if the host is unknown: run ssh-keyscan for $SSH_HOST
and ensure it appends to ~/.ssh/known_hosts without suppressing errors (remove
the "|| true" behavior), remove the "-o StrictHostKeyChecking=no" option from
the ssh command (or set it to "yes"), and ensure the workflow exits if
ssh-keyscan fails so deployments abort on unknown or changed host keys (refer to
the ssh invocation and the ssh-keyscan lines in the diff).
- Around line 42-45: The remote heredoc uses cd $DEPLOY_PATH but step-level env
vars aren’t forwarded over SSH, so ensure the remote receives the actual path:
either interpolate the variable on the runner into the SSH payload (replace cd
$DEPLOY_PATH with cd ${DEPLOY_PATH} expanded by GitHub Actions / use ${{
env.DEPLOY_PATH }}), or explicitly pass it into the remote shell (e.g., prefix
the ssh invocation with DEPLOY_PATH="${{ env.DEPLOY_PATH }}" bash -c 'ssh ...
"cd \"$DEPLOY_PATH\" && ..."', or pass it as an argument to the remote bash -s).
Update each heredoc block that uses DEPLOY_PATH (the ssh << 'EOF' sections) to
use one of these approaches so the remote cd uses a concrete value instead of an
empty variable.

In @.github/workflows/ci.yml:
- Around line 92-112: The workflow is missing a top-level permissions block
causing the github/codeql-action/upload-sarif@v2 step (used in the trivy job) to
fail; add a top-level permissions section (immediately after the on: section)
that includes security-events: write so the Upload SARIF step can write to the
Security tab, keeping other token permissions as needed (e.g., read for
contents) and ensuring the trivy job uses the repository token with those
permissions.
- Around line 99-101: Replace mutable action refs with immutable commit SHAs:
update aquasecurity/trivy-action@master to the full commit SHA that corresponds
to the desired release (e.g., the commit SHA for v0.35.0) and similarly replace
github/codeql-action/upload-sarif@v2 with its exact commit SHA; locate the
correct SHAs in each action's GitHub repo (Releases/Tags) and use the SHA form
(e.g., aquasecurity/trivy-action@<full-sha> and
github/codeql-action/upload-sarif@<full-sha>), optionally appending the
human-readable tag as a comment for clarity.

In `@pnpm-workspace.yaml`:
- Around line 4-7: The pnpm workspace contains an unsupported allowBuilds block
(symbols: allowBuilds, msw, sharp, unrs-resolver) which PNPM v9 ignores; remove
the entire allowBuilds section and rely on the existing ignoredBuiltDependencies
pattern (symbol: ignoredBuiltDependencies) to control build behavior
instead—delete lines defining allowBuilds and its entries so only
ignoredBuiltDependencies remains.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cf5f2949-0372-47b5-925f-d057e8341008

📥 Commits

Reviewing files that changed from the base of the PR and between 4e09a30 and 49a4c01.

📒 Files selected for processing (3)
  • .github/workflows/cd.yml
  • .github/workflows/ci.yml
  • pnpm-workspace.yaml

Comment thread .github/workflows/cd.yml
Comment on lines +40 to +43
ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts 2>/dev/null || true

ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@$SSH_HOST << 'EOF'
set -e

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Host verification is effectively bypassed during SSH deploy.

At Line 42/109/176, StrictHostKeyChecking=no negates host authenticity checks; combined with ssh-keyscan ... || true (Line 40/107/174), this is vulnerable to MITM during deployment.

Also applies to: 107-110, 174-177

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/cd.yml around lines 40 - 43, The deploy workflow is
bypassing host verification by using "StrictHostKeyChecking=no" in the ssh
invocation and swallowing ssh-keyscan errors with "|| true"; update the deploy
step so the host key is reliably installed and SSH fails if the host is unknown:
run ssh-keyscan for $SSH_HOST and ensure it appends to ~/.ssh/known_hosts
without suppressing errors (remove the "|| true" behavior), remove the "-o
StrictHostKeyChecking=no" option from the ssh command (or set it to "yes"), and
ensure the workflow exits if ssh-keyscan fails so deployments abort on unknown
or changed host keys (refer to the ssh invocation and the ssh-keyscan lines in
the diff).

Comment thread .github/workflows/cd.yml
Comment on lines +42 to +45
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@$SSH_HOST << 'EOF'
set -e
cd $DEPLOY_PATH

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

DEPLOY_PATH is not guaranteed on the remote shell.

At Line 44/111/178, cd $DEPLOY_PATH runs inside a remote shell invoked via << 'EOF'; step-level env vars are not automatically forwarded over SSH, so this can resolve empty and deploy in the wrong directory.

Safer pattern: pass env vars explicitly to remote bash
-ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@$SSH_HOST << 'EOF'
+ssh -i ~/.ssh/deploy_key ${{ secrets.SSH_USER }}@$SSH_HOST \
+  "DEPLOY_PATH='${DEPLOY_PATH}' PORT='${PORT}' NODE_ENV='${NODE_ENV}' bash -se" << 'EOF'
 set -e
-cd $DEPLOY_PATH
+cd "$DEPLOY_PATH"

Also applies to: 109-112, 176-179

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/cd.yml around lines 42 - 45, The remote heredoc uses cd
$DEPLOY_PATH but step-level env vars aren’t forwarded over SSH, so ensure the
remote receives the actual path: either interpolate the variable on the runner
into the SSH payload (replace cd $DEPLOY_PATH with cd ${DEPLOY_PATH} expanded by
GitHub Actions / use ${{ env.DEPLOY_PATH }}), or explicitly pass it into the
remote shell (e.g., prefix the ssh invocation with DEPLOY_PATH="${{
env.DEPLOY_PATH }}" bash -c 'ssh ... "cd \"$DEPLOY_PATH\" && ..."', or pass it
as an argument to the remote bash -s). Update each heredoc block that uses
DEPLOY_PATH (the ssh << 'EOF' sections) to use one of these approaches so the
remote cd uses a concrete value instead of an empty variable.

Comment thread .github/workflows/cd.yml
Comment on lines +54 to +55
export NODE_ENV=production
export PORT=3000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Dev/Staging deployments are forcing production runtime mode.

At Line 54 and Line 121, NODE_ENV=production overrides the job env (development/staging), so both non-prod jobs run with prod runtime semantics.

Also applies to: 121-122

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/cd.yml around lines 54 - 55, The workflow currently
hardcodes NODE_ENV to "production" by using "export NODE_ENV=production" (also
duplicated later), which forces dev/staging jobs into prod mode; remove the
hardcoded export or replace it with a dynamic/job-level value (e.g. export
NODE_ENV=${{ env.NODE_ENV }} or simply omit export so the job's NODE_ENV is
inherited) and keep the PORT export if needed (export PORT=3000) — update both
occurrences where "export NODE_ENV=production" appears.

Comment thread .github/workflows/ci.yml
Comment on lines +92 to +112
trivy:
name: Trivy Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: "fs"
scan-ref: "."
format: "sarif"
output: "trivy-results.sarif"

- name: Upload Trivy results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: "trivy-results.sarif"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

For github/codeql-action/upload-sarif, which GITHUB_TOKEN permissions are required in GitHub Actions workflows?

💡 Result:

Required GITHUB_TOKEN permissions for github/codeql-action/upload-sarif (using the default GITHUB_TOKEN): 1) security-events: write - The action’s token input description states that the workflow must have security-events: write when using the built-in GitHub Actions token.[1] - GitHub’s SARIF upload docs likewise show security-events: write as required for all workflows using upload-sarif.[2][3] 2) (Only for private repositories) actions: read - GitHub’s SARIF upload docs show actions: read as “only required for workflows in private repositories”.[2][3] What to put in your workflow: permissions: security-events: write # only required for workflows in private repositories actions: read # (docs example also includes contents: read) contents: read Notes / scope: - The upload-sarif action relies on the built-in Actions token by default; if you set the token input explicitly, the same requirement (security-events: write) applies.[1]

Citations:


🏁 Script executed:

cat -n .github/workflows/ci.yml | head -50

Repository: hngprojects/skillbridge-fe

Length of output: 1399


🏁 Script executed:

sed -n '85,120p' .github/workflows/ci.yml

Repository: hngprojects/skillbridge-fe

Length of output: 932


Add explicit security-events: write permission for SARIF upload.

The workflow lacks a permissions block at the top level. The github/codeql-action/upload-sarif@v2 action (line 108) requires security-events: write permission to upload SARIF results to GitHub's security tab. Without this, the upload will fail under restricted default token permissions.

Add the following permissions block after the on: section:

 name: Frontend CI

 on:
   pull_request:
     branches: [dev, staging, main]
   push:
     branches: [dev, staging, main]

+permissions:
+  contents: read
+  security-events: write
+
 env:
   NODE_VERSION: "20"
   PNPM_VERSION: 9
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 92 - 112, The workflow is missing a
top-level permissions block causing the github/codeql-action/upload-sarif@v2
step (used in the trivy job) to fail; add a top-level permissions section
(immediately after the on: section) that includes security-events: write so the
Upload SARIF step can write to the Security tab, keeping other token permissions
as needed (e.g., read for contents) and ensuring the trivy job uses the
repository token with those permissions.

Comment thread .github/workflows/ci.yml
Comment on lines +99 to +101
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

What is the recommended secure pinning strategy for GitHub Actions (tag vs commit SHA), specifically for aquasecurity/trivy-action?

💡 Result:

The recommended secure pinning strategy for GitHub Actions, including aquasecurity/trivy-action, is to pin to a full commit SHA rather than a tag. Tags are mutable and can be force-pushed to point to malicious code, as seen in recent Trivy-related supply chain attacks [1][2][3]. GitHub explicitly recommends "Pin actions to a full length commit SHA" as the only way to use an action as an immutable release [4][5][6][7]. For aquasecurity/trivy-action specifically: - Use syntax like uses: aquasecurity/trivy-action@abc123def456... # v0.33.1 where the SHA corresponds to the desired release tag [8][9][10]. - The action internally calls aquasecurity/setup-trivy, which was previously pinned to a tag but updated to a commit SHA (e.g., e6c2c5e321ed9123bda567646e2f96565e34abe1 # v0.2.4) via PR #456 to support organizational SHA-only policies [11][12][9]. - Examples in the repo use tags like @0.33.1 for convenience, but for security, replace with the SHA from the tag [8][10][13]. - Tools like Dependabot can automate updates by creating PRs to refresh SHAs while preserving version comments [5][14]. This aligns with GitHub's security best practices and addresses issues raised in trivy-action repo discussions [11][12][15]. Note limitations: SHA pinning protects against tag hijacking but not orphaned commits from forks or unverified transitive dependencies [1][16][3].

Citations:


🏁 Script executed:

cat -n .github/workflows/ci.yml | sed -n '95,110p'

Repository: hngprojects/skillbridge-fe

Length of output: 624


🏁 Script executed:

cat -n .github/workflows/ci.yml | sed -n '85,115p'

Repository: hngprojects/skillbridge-fe

Length of output: 1046


🏁 Script executed:

cat -n .github/workflows/ci.yml | head -20

Repository: hngprojects/skillbridge-fe

Length of output: 503


🏁 Script executed:

grep -n "permissions" .github/workflows/ci.yml

Repository: hngprojects/skillbridge-fe

Length of output: 52


Pin Trivy action to a full commit SHA instead of @master.

At line 100, aquasecurity/trivy-action@master uses a mutable reference and poses a supply-chain risk—@master can be force-pushed to point to malicious code. GitHub's security best practice is to pin GitHub Actions to full commit SHAs (e.g., aquasecurity/trivy-action@abc123def456... # v0.35.0), which are immutable. You can find the commit SHA corresponding to a release tag in the action's repository.

Additionally, github/codeql-action/upload-sarif@v2 (line 108) also uses a mutable tag; consider pinning it to a commit SHA as well.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 99 - 101, Replace mutable action refs
with immutable commit SHAs: update aquasecurity/trivy-action@master to the full
commit SHA that corresponds to the desired release (e.g., the commit SHA for
v0.35.0) and similarly replace github/codeql-action/upload-sarif@v2 with its
exact commit SHA; locate the correct SHAs in each action's GitHub repo
(Releases/Tags) and use the SHA form (e.g., aquasecurity/trivy-action@<full-sha>
and github/codeql-action/upload-sarif@<full-sha>), optionally appending the
human-readable tag as a comment for clarity.

Comment thread pnpm-workspace.yaml
Comment on lines +4 to +7
allowBuilds:
msw: false
sharp: false
unrs-resolver: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

For PNPM v9, what are the valid pnpm-workspace.yaml keys to control dependency build scripts? Is allowBuildsvalid, or shouldonlyBuiltDependencies/ignoredBuiltDependencies be used instead?

💡 Result:

For pnpm v9, the workspace-level configuration keys for controlling which dependency build/lifecycle scripts are allowed are: 1) allowBuilds - Invalid for pnpm v9. It was introduced later (added in v10.26.0) as a replacement for the older build-approval settings. [1][2] 2) onlyBuiltDependencies - Valid in v9 (this is the allowlist-style setting used to restrict which dependencies may run lifecycle scripts). [1][3] 3) ignoredBuiltDependencies - Valid in v9 (used together with onlyBuiltDependencies to mute/ignore build execution for certain dependencies). [1][4] Recommendation (your question about what to use instead): - Do not use allowBuilds in pnpm v9. - Use onlyBuiltDependencies / ignoredBuiltDependencies (the older settings) to control dependency build script execution in v9. [1][3][4] Notes: - The newer allowBuilds model explicitly replaces onlyBuiltDependencies and ignoredBuiltDependencies, consolidating them into a single allow/disallow map. This replacement is described in the settings documentation (and is part of the reason allowBuilds is not applicable to v9). [1] Cited evidence: - allowBuilds “Added in: v10.26.0” and “replaces onlyBuiltDependencies and ignoredBuiltDependencies” [2][1] - The settings doc also explains the allowlist/ignored-builds migration and lists both onlyBuiltDependencies and ignoredBuiltDependencies as prior settings (replaced in v11+) [1][2] - approve-builds writes entries into the allowBuilds map (showing allowBuilds is the newer mechanism, not the v9 one) [4] If you share your exact pnpm-workspace.yaml (and whether you also set strictDepBuilds / strict-dep-builds), I can suggest the exact v9-compatible snippet.

Citations:


🏁 Script executed:

# Check for pnpm version in common locations
find . -name ".npmrc" -o -name "pnpm-workspace.yaml" -o -name "package.json" | head -20

Repository: hngprojects/skillbridge-fe

Length of output: 107


🏁 Script executed:

# Check the full pnpm-workspace.yaml file to understand current state
if [ -f "pnpm-workspace.yaml" ]; then
  cat -n pnpm-workspace.yaml
fi

Repository: hngprojects/skillbridge-fe

Length of output: 277


🏁 Script executed:

# Check for pnpm version in CI/CD or config files
if [ -f ".github/workflows" ] || [ -d ".github/workflows" ]; then
  find .github -name "*.yml" -o -name "*.yaml" | xargs grep -l "pnpm" | head -5
fi

# Also check for .npmrc
if [ -f ".npmrc" ]; then
  cat -n .npmrc
fi

Repository: hngprojects/skillbridge-fe

Length of output: 120


🏁 Script executed:

# Check PNPM version in CI workflows
grep -n "pnpm" .github/workflows/ci.yml .github/workflows/cd.yml

Repository: hngprojects/skillbridge-fe

Length of output: 1688


🏁 Script executed:

# Check package.json for pnpm version constraint
cat -n package.json | head -30

Repository: hngprojects/skillbridge-fe

Length of output: 1075


Remove allowBuilds—it is not supported in PNPM v9 and will be silently ignored.

The allowBuilds block at lines 4–7 is invalid for PNPM v9. This key was introduced in v10.26.0 and is not recognized by the pnpm version in use. The configuration will be silently ignored, leaving no build restrictions in place.

Use the existing ignoredBuiltDependencies pattern (already present at lines 8–10) instead. Remove lines 4–7:

Suggested fix
-allowBuilds:
-  msw: false
-  sharp: false
-  unrs-resolver: false
 ignoredBuiltDependencies:
   - sharp
   - unrs-resolver
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm-workspace.yaml` around lines 4 - 7, The pnpm workspace contains an
unsupported allowBuilds block (symbols: allowBuilds, msw, sharp, unrs-resolver)
which PNPM v9 ignores; remove the entire allowBuilds section and rely on the
existing ignoredBuiltDependencies pattern (symbol: ignoredBuiltDependencies) to
control build behavior instead—delete lines defining allowBuilds and its entries
so only ignoredBuiltDependencies remains.

@ik-alex ik-alex closed this May 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants