Skip to content

fix(security): resolve Dependabot and CodeQL vulnerabilities#677

Open
cl-efornaciari wants to merge 2 commits intodevelopfrom
fix/security-vulnerabilities
Open

fix(security): resolve Dependabot and CodeQL vulnerabilities#677
cl-efornaciari wants to merge 2 commits intodevelopfrom
fix/security-vulnerabilities

Conversation

@cl-efornaciari
Copy link

Summary

This PR addresses Dependabot and CodeQL security alerts in chainlink-starknet.

Dependabot Fixes

Added package.json resolutions and regenerated yarn.lock.

Unfixable/No patch: elliptic, pion/dtls (Go), pkg (dev-only)

CodeQL Fixes

  • Workflow permissions: Added permissions: contents: read to 13 workflow jobs (golangci-lint, static-analysis, lint, relayer, sonar-scan, changesets, contracts, examples, integration_gauntlet)
  • Log injection: Sanitized subprocess stdout/stderr in ops/localenv/main.go (lines 101, 112) - replaced control chars to prevent log injection from user-controlled subprocess output
  • Empty passwords: Added comment to .helm-repositories.yaml documenting that empty password fields are intentional for public chart repos (bitnami, chainlink-qa, grafana)

How changes were made

  1. Added resolutions to package.json for fixable npm vulnerabilities; ran yarn install --mode=update-lockfile to regenerate yarn.lock
  2. Added permissions: contents: read to all workflow jobs missing explicit permissions
  3. Implemented sanitizeForLog() in ops/localenv/main.go to escape control characters in subprocess output before printing
  4. Added documentation comment to .helm-repositories.yaml for empty password fields

Made with Cursor

Dependabot:
- Add resolutions for minimatch, axios, bn.js, undici, tmp, cookie to patched versions
- Update yarn.lock with security fixes

CodeQL:
- Add permissions: contents read to workflow jobs (missing-workflow-permissions)
- Sanitize subprocess output in ops/localenv/main.go to prevent log injection
- Add comment to .helm-repositories.yaml for intentionally empty passwords (public repos)
@cl-sonarqube-production
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant