Skip to content

Commit

Permalink
Upgrade some dependencies and exclude cucumber and eslint from the vu…
Browse files Browse the repository at this point in the history
…lnerability report
  • Loading branch information
asein-sinch committed Dec 14, 2024
1 parent cd9ca65 commit b98a3f0
Show file tree
Hide file tree
Showing 4 changed files with 679 additions and 325 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/validate-audit-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ awk 'NR > 1 {print ","} {print}' audit-report.txt >> audit-report.json
echo ']}' >> audit-report.json

# Filter JSON array to remove jest and lerna's transitive dependencies as these dependencies are not used at runtime
jq '.vulnerabilities |= map(select(.data.resolution.path | type == "string" and (startswith("lerna") or startswith("jest") or startswith("@types/jest") or startswith("babel-jest")) | not))' audit-report.json > audit-report-filtered.json
jq '.vulnerabilities |= map(select(.data.resolution.path | type == "string" and (startswith("lerna") or startswith("jest") or startswith("@types/jest") or startswith("babel-jest") or startswith("eslint") or startswith("@cucumber")) | not))' audit-report.json > audit-report-filtered.json

# Fail the build if filtered JSON array contains audit advisories
if [ "$(jq '.vulnerabilities[] | select(.type == "auditAdvisory") | .type' audit-report-filtered.json | wc -l)" -gt 0 ]; then
Expand Down
10 changes: 5 additions & 5 deletions examples/webhooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"start:prod": "node dist/main"
},
"dependencies": {
"@nestjs/common": "^10.4.4",
"@nestjs/core": "^10.4.4",
"@nestjs/platform-express": "^10.4.4",
"@nestjs/common": "^10.4.15",
"@nestjs/core": "^10.4.15",
"@nestjs/platform-express": "^10.4.15",
"@sinch/sdk-core": "^1.2.0",
"dotenv": "^16.3.1",
"raw-body": "^2.5.2",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/cli": "^10.4.9",
"@nestjs/schematics": "^10.2.3",
"@types/express": "^4.17.17",
"@types/multer": "^1.4.11",
"@types/node": "^20.8.7",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@cucumber/cucumber": "^10.3.1",
"@cucumber/cucumber": "^11.1.1",
"@types/jest": "^29.5.13",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
Expand Down
Loading

0 comments on commit b98a3f0

Please sign in to comment.