1
0
Fork 0
mirror of https://github.com/imjasonh/govulncheck-action synced 2026-07-07 00:12:55 +00:00
govulncheck-action/test
Jason Hall 24718a7114
Detect and fail on missing go.sum dependencies
Previously, if go.sum was out of date or missing, govulncheck would fail
to analyze the code but the action would report "no vulnerabilities found"
which is misleading and dangerous.

This change:
- Detects specific error patterns in govulncheck stderr that indicate
  missing dependencies (missing go.sum entry, could not import, invalid package name)
- Throws a clear error message telling users to run 'go mod tidy'
- Prevents false "no vulnerabilities" reports when govulncheck can't analyze the code

Added tests to verify the behavior for both missing go.sum and import errors.

Fixes the issue where vulnerabilities could be missed due to dependency problems.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 02:08:43 -04:00
..
annotator.test.js Improve test coverage to 99.64% 2025-06-07 01:44:32 -04:00
govulncheck.test.js Add comprehensive CI workflow and fix test suite 2025-06-07 01:31:57 -04:00
index-main.test.js Improve test coverage to 99.64% 2025-06-07 01:44:32 -04:00
index.test.js Detect and fail on missing go.sum dependencies 2025-06-07 02:08:43 -04:00
parser.test.js Improve test coverage to 99.64% 2025-06-07 01:44:32 -04:00
summary.test.js Improve test coverage to 99.64% 2025-06-07 01:44:32 -04:00