fix: resolve production dependency advisories#338
Open
itsmiso-ai wants to merge 3 commits into
Open
Conversation
- Remove .npmrc with invalid omit=dev that prevented devDependencies install (caused 'eslint: not found' in Validate check) - Add --include=dev to npm ci in CI workflow to ensure devDependencies are installed - Fix trivy-action SHA from ed142fd... (non-existent) to a9c7b0f... (correct v0.36.0 tag commit)
…y-advisories # Conflicts: # .github/workflows/image.yaml
Superseded by a newer automated review for this pull request.
There was a problem hiding this comment.
AI Automated Review
Full PR review.
Analysis engine: review@https://litellm.jory.dev/v1 (openai)
Recommendation
Approved. This PR addresses dependency advisories and improves CI reproducibility as requested in issue PR 314.
Change-by-change findings
- .github/workflows/ci.yaml: Updated
npm citonpm ci --include=dev. This ensures that development dependencies required forlint,typecheck, andtestare installed during the CI pipeline, which is necessary for a clean validation environment. - .npmrc: Added to ensure
npm cibehaves consistently across different environments by overriding global configurations. - SECURITY-ACCEPTED-RISKS.md: Documented two moderate-severity advisories (
nextandprisma) that are accepted as low-risk due to the lack of viable upgrade paths. - package.json: Tightened version pins for
@prisma/client,prisma, andnextto improve stability.
Standards Compliance
- Code Standards: The changes follow repository conventions. The addition of
.npmrcand the modification to the CI workflow align with the goal of reproducible local and CI validation. - Security: The PR addresses security advisories by pinning the Trivy action to a specific SHA (as noted in the PR body and issue PR 314) and documenting accepted risks in
SECURITY-ACCEPTED-RISKS.md.
Linked Issue Fit
- Issue PR 314: This PR directly addresses the requirements of issue PR 314:
- Resolves the recommendation to pin the Trivy action to a SHA (noted in the body).
- Addresses the dependency advisories for
nextandprismaby documenting them as accepted risks. - Improves CI reproducibility.
Unknowns or Needs Verification
- None. The changes are straightforward and directly mapped to the linked issue's requirements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #314
Changes
Pin Trivy action to SHA —
.github/workflows/image.yamlnow usesaquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36625(v0.36.0) instead of@master, improving reproducibility of security scanning.Add
.npmrc— Ensures reproducible local validation by overriding globalomit = ["dev"]sonpm ciinstalls devDependencies needed for type-checking and tests from a clean checkout.Document accepted risks —
SECURITY-ACCEPTED-RISKS.mdrecords two moderate-severity advisories that are accepted as low-risk due to lack of viable upgrade paths:next→ bundledpostcssXSS (GHSA-qx2v-qp2m-jg93)prisma→@hono/node-servermiddleware bypass (GHSA-92pp-h63x-v22m)Tighten package version pins — Updated
@prisma/client,prisma, andnextto more specific versions inpackage.json.