Skip to content

feat: add static security scanning to CI - #1934

Merged
TerryHowe merged 5 commits into
oras-project:mainfrom
bupd:static-check
Dec 26, 2025
Merged

TerryHowe merged 5 commits into
oras-project:mainfrom
bupd:static-check

Conversation

@bupd

@bupd bupd commented Dec 10, 2025 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds vulnerability scanning to the ORAS CI pipeline:

  • govulncheck GitHub Action: New workflow (.github/workflows/vulnerability-check.yml) that runs on PRs and pushes to main/release branches, scanning Go dependencies for known vulnerabilities
  • Local security checks: New make govulncheck target for running vulnerability scans locally before pushing
  • Go version update: Bumps Go to 1.25.5 to address vulnerabilities in the Go toolchain itself

This complements the existing CodeQL analysis by adding Go-specific vulnerability detection for dependencies.

Which issue(s) this PR fixes

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the CI pipeline by adding static security scanning capabilities to detect security vulnerabilities in both the codebase and its dependencies. The changes include integrating gosec for static code analysis, govulncheck for dependency vulnerability scanning, and updating the Go version to address security issues.

  • Added gosec linter to golangci-lint configuration for static security analysis
  • Added GitHub Actions workflow for automated vulnerability checking with govulncheck
  • Added make govulncheck target for local security testing
  • Updated Go version from 1.25.4 to 1.25.5 across multiple configuration files

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.golangci.yml Added gosec linter to the enabled linters list for security scanning
.github/workflows/vulnerability-check.yml New workflow that runs govulncheck on push and pull requests to detect dependency vulnerabilities
Makefile Added govulncheck target to enable local vulnerability scanning
go.mod Updated Go version to 1.25.5
test/e2e/go.mod Updated Go version to 1.25.5 for e2e tests
.github/workflows/release-github.yml Updated Go version to 1.25.5 for release builds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add vulnerability-check.yml workflow with govulncheck
- Add govulncheck target to Makefile
- Update Go version to 1.25.5 to fix vulnerabilities

Signed-off-by: bupd <[email protected]>
Signed-off-by: bupd <[email protected]>
@codecov

codecov Bot commented Dec 17, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.22%. Comparing base (a808bec) to head (68fc1aa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1934      +/-   ##
==========================================
+ Coverage   87.18%   87.22%   +0.03%     
==========================================
  Files         143      143              
  Lines        5540     5540              
==========================================
+ Hits         4830     4832       +2     
+ Misses        423      421       -2     
  Partials      287      287              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@bimakw

bimakw commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

@TerryHowe Thank you for the approval! All CI checks are passing. Could this be merged when you have a moment? 🙏

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

Thanks!

@TerryHowe
TerryHowe merged commit cdef683 into oras-project:main Dec 26, 2025
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.

Add static security check

5 participants