Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions .github/workflows/container-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,26 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Trivy fs scan (secrets + manifest CVEs)
# Two passes so the build fails on a clear, human-readable report
# AND a SARIF still lands in code-scanning. SARIF format alone
# does not echo findings to the job log.
- name: Trivy fs scan (table — fail-on-findings)
uses: aquasecurity/trivy-action@master
with:
scan-type: fs
scan-ref: '.'
severity: 'HIGH,CRITICAL'
exit-code: '1'
ignore-unfixed: true
format: table
scanners: 'vuln,secret,misconfig'
# Skip transitive test-fixture Dockerfiles inside node_modules
# (e.g. getos/tests/...). They are not our code and not shipped.
# Real CVEs in node_modules still surface via the pnpm scanner.
skip-dirs: node_modules

- name: Trivy fs scan (SARIF — code scanning upload)
if: always()
uses: aquasecurity/trivy-action@master
with:
scan-type: fs
Expand All @@ -47,6 +66,7 @@ jobs:
format: sarif
output: trivy-fs-results.sarif
scanners: 'vuln,secret,misconfig'
skip-dirs: node_modules

- name: Upload fs SARIF
if: always()
Expand All @@ -73,7 +93,25 @@ jobs:
load: true
tags: contractor-os-api:scan

- name: Trivy image scan
- name: Trivy image scan (table — fail-on-findings)
uses: aquasecurity/trivy-action@master
with:
scan-type: image
image-ref: contractor-os-api:scan
severity: 'HIGH,CRITICAL'
exit-code: '1'
ignore-unfixed: true
format: table
# The bundled npm CLI inside the node:22-alpine base image
# ships with its own picomatch. We do not invoke npm at
# runtime (the image runs node directly on dist/main.js), so
# the base-image npm tree is not exposed. Skip its node_modules
# to keep the gate strict on the app surface that actually
# serves traffic.
skip-dirs: 'usr/local/lib/node_modules/npm'

- name: Trivy image scan (SARIF — code scanning upload)
if: always()
uses: aquasecurity/trivy-action@master
with:
scan-type: image
Expand All @@ -83,6 +121,7 @@ jobs:
ignore-unfixed: true
format: sarif
output: trivy-image-results.sarif
skip-dirs: 'usr/local/lib/node_modules/npm'

- name: Upload image SARIF
if: always()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Audit (advisory — report high+critical without failing)
run: pnpm audit --audit-level=high || true
- name: Audit (high+critical fail the build)
run: pnpm audit --audit-level=high
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@contractor-os/shared": "workspace:*",
"lucide-react": "^0.575.0",
"motion": "^12.34.3",
"next": "^15.2.0",
"next": "^15.5.18",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The version ^15.5.18 for next does not exist on the public npm registry. The current latest stable version of Next.js is 15.1.7. Please check if this is a typo or if you are using a private registry with custom patches. If it is a typo, it will cause installation failures.

"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-parallax-tilt": "^1.7.319",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@
"bcrypt",
"cypress",
"sharp"
]
],
"overrides": {
"handlebars": ">=4.7.9",
"minimatch@<3.1.4": "3.1.4",
"minimatch@>=4.0.0 <9.0.7": "9.0.7",
"minimatch@>=10.0.0 <10.2.3": "10.2.3",
"multer": ">=2.1.1",
"lodash": ">=4.18.0",
"path-to-regexp": ">=8.4.0",
"serialize-javascript": ">=7.0.3",
"flatted": ">=3.4.2",
"picomatch": ">=4.0.4",
"fast-uri": ">=3.1.2",
"@babel/plugin-transform-modules-systemjs": ">=7.29.4"
}
Comment on lines +24 to +37
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-critical critical

Several dependency versions specified in this overrides block do not appear to exist on the public npm registry. For example:

  • lodash@4.18.1 (Latest stable is 4.17.21)
  • handlebars@4.7.9 (Latest stable is 4.7.8)
  • multer@2.1.1 (Latest stable is 1.4.5-lts.1)
  • @babel/plugin-transform-modules-systemjs@7.29.4 (Latest is 7.26.9)

Using non-standard or non-existent versions is a critical security risk (potential dependency confusion or supply chain attack) and will cause build failures in standard environments. Please verify these versions and ensure they are sourced from a trusted, reachable registry.

},
"devDependencies": {
"turbo": "^2.8.9",
Expand Down
Loading
Loading