Compare commits

75 Commits

Author SHA1 Message Date
renovate[bot]
e385319445 chore(actions): update github/codeql-action action (v4.32.6 → v4.33.0) (#198)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-18 05:23:58 +00:00
Copilot
1ce47441ec fix(security): suppress gosec G118 false positives and fix govulncheck stdlib vulnerabilities (#197) 2026-03-15 17:41:43 +02:00
renovate[bot]
a746d4f504 chore(actions): update ivuorinen/actions action (v2026.03.11 → v2026.03.14) (#196)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-15 05:33:42 +00:00
renovate[bot]
c8ce1dac72 fix(deps): update module golang.org/x/text (v0.34.0 → v0.35.0) (#195)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-12 08:43:18 +00:00
renovate[bot]
18921311a5 chore(actions): update ivuorinen/actions action (v2026.03.10 → v2026.03.11) (#194)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-12 04:38:04 +00:00
renovate[bot]
261312ef70 chore(actions): update ivuorinen/actions action (v2026.03.09 → v2026.03.10) (#193)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-11 03:54:06 +00:00
renovate[bot]
a2fd923c7a chore(actions): update ivuorinen/actions action (v2026.03.08 → v2026.03.09) (#192)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 01:17:40 +00:00
renovate[bot]
96c6d12716 chore(deps): update pre-commit hook editorconfig-checker/editorconfig-checker.python (3.6.0 → 3.6.1) (#191)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 10:48:32 +00:00
renovate[bot]
f3a0f288af chore(actions): update ivuorinen/actions action (v2026.03.07 → v2026.03.08) (#190)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 06:12:50 +00:00
renovate[bot]
73b4c392a2 chore(deps): update dependency go (1.26.0 → 1.26.1) (#189)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-08 13:51:15 +00:00
renovate[bot]
3b138743e4 chore(actions): update ivuorinen/actions action (v2026.03.06 → v2026.03.07) (#188)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-08 06:01:12 +00:00
renovate[bot]
effac46625 chore(deps)!: update docker/setup-buildx-action (v3.12.0 → v4.0.0) (#185)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-07 18:46:44 +02:00
fff486eaf3 ci: migrate CodeQL to ivuorinen/actions/codeql-analysis (#184)
* ci: migrate codeql to composable workflow

* fix: correct codeql workflow language, queries, permissions, and action ref

- Use 'javascript' instead of 'javascript-typescript' for CodeQL language
- Add queries: security-and-quality parameter
- Set root-level permissions to {}
- Add job-level permissions (actions, contents, packages, security-events)
- Pin action ref to commit hash with version comment
- Fix mangled cron schedule
2026-03-07 18:43:35 +02:00
renovate[bot]
c771b85e68 chore(deps): update github/codeql-action action (v4.32.5 → v4.32.6) (#187)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-07 16:36:34 +00:00
renovate[bot]
acd100f7dc chore(deps): update ivuorinen/actions action (v2026.03.02 → v2026.03.06) (#186)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-07 14:02:32 +00:00
renovate[bot]
a36e19f590 chore(deps): update github/codeql-action action (v4.32.4 → v4.32.5) (#183)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 10:41:50 +00:00
renovate[bot]
330180890e chore(deps): update ivuorinen/actions action (v2026.02.28 → v2026.03.02) (#182)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 05:17:06 +00:00
renovate[bot]
9abf352a9c chore(deps): update securego/gosec action (v2.23.0 → v2.24.7) (#181)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-02 00:55:20 +00:00
renovate[bot]
726e938057 chore(deps): update ivuorinen/actions action (v2026.02.24 → v2026.02.28) (#180)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-01 21:52:05 +00:00
renovate[bot]
8f2afd62cb chore(deps): update actions/setup-go action (v6.2.0 → v6.3.0) (#179)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-27 04:17:26 +02:00
renovate[bot]
98d52ed75f chore(deps)!: update actions/upload-artifact (v6.0.0 → v7.0.0) (#178)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-27 02:51:28 +02:00
renovate[bot]
59ab6de505 chore(deps): update ivuorinen/actions action (v2026.02.23 → v2026.02.24) (#177)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-25 01:02:08 +00:00
renovate[bot]
0bd3be66a0 chore(deps): update ivuorinen/actions action (v2026.02.18 → v2026.02.23) (#176)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-24 00:55:41 +00:00
renovate[bot]
3ab1180cee chore(deps): update github/codeql-action action (v4.32.3 → v4.32.4) (#175)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-22 04:41:23 +00:00
renovate[bot]
a1f30550e1 chore(deps): update ivuorinen/actions action (v2026.02.17 → v2026.02.18) (#174)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-19 04:59:55 +00:00
renovate[bot]
3e6c4d963e chore(deps): update ivuorinen/actions action (v2026.02.16 → v2026.02.17) (#173)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-18 02:33:45 +00:00
f2fc7cded1 chore: add CODEOWNERS file for repository ownership 2026-02-18 01:17:54 +02:00
renovate[bot]
848a78b771 chore(deps): update github/codeql-action action (v4.32.1 → v4.32.3) (#167)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-18 01:16:55 +02:00
4559d1b7fc feat: update Go version from 1.25.6 to 1.25.7 (#172) 2026-02-18 01:10:58 +02:00
renovate[bot]
691cccf40a chore(deps): update securego/gosec action (v2.22.11 → v2.23.0) (#170)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-17 19:04:43 +02:00
renovate[bot]
7f057c5707 chore(deps): update ivuorinen/actions action (v2026.02.10 → v2026.02.16) (#171)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-17 01:03:21 +00:00
renovate[bot]
7a87d8c3b8 chore(deps): update go (1.25.6 → 1.26.0) (#166)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 20:39:54 +02:00
renovate[bot]
8ecf02605b fix(deps): update module golang.org/x/text (v0.33.0 → v0.34.0) (#168)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 19:56:28 +02:00
renovate[bot]
0f57e87d3d chore(deps): update ivuorinen/actions action (v2026.02.03 → v2026.02.10) (#169)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 05:26:47 +00:00
renovate[bot]
9c3de701a6 chore(deps): update ivuorinen/actions action (v2026.01.21 → v2026.02.03) (#165)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-04 10:05:40 +00:00
renovate[bot]
c07b0a9101 chore(deps): update github/codeql-action action (v4.32.0 → v4.32.1) (#164)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-04 04:31:07 +00:00
renovate[bot]
9ff22c76b0 chore(deps): update image alpine to v3.23.3 (#162)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-01 22:13:14 +02:00
994099137a fix: security issues and use gitleaks (#163)
* fix(tests): remove unused test constants and helpers

Delete dead test code that caused 41 staticcheck U1000 violations:
- cli/test_constants.go (25 unused constants)
- cli/terminal_test_helpers.go (unused type, method, 7 variables)
- fileproc/test_constants.go (5 unused constants)
- fileproc/processor_test.go (2 unused helper functions)

* fix(security): replace custom secret detection with gitleaks

The hand-rolled check_secrets regex patterns produced false positives
on configKey test values, causing make security-full to fail.

Replace with gitleaks via go run for proper secret detection with
built-in rules and allowlist support for generated report files.

* chore(deps): update dependencies and fix install-tools

Update Go module dependencies to latest versions.
Fix checkmake install path and remove yamllint go install
(yamllint is a Python tool, not installable via go install).

* docs: add design document for gitleaks integration

* feat: update go to 1.25.6
2026-02-01 22:09:24 +02:00
renovate[bot]
7a99534252 chore(deps): update github/codeql-action action (v4.31.11 → v4.32.0) (#161)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-28 06:13:12 +00:00
renovate[bot]
1f49598a1f chore(deps): update github/codeql-action action (v4.31.10 → v4.31.11) (#160)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-25 12:27:45 +00:00
renovate[bot]
13c7af276a chore(deps): update actions/checkout action (v6.0.1 → v6.0.2) (#159)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-24 04:27:56 +00:00
renovate[bot]
cf6ab06762 chore(deps): update ivuorinen/actions action (v2026.01.20 → v2026.01.21) (#158)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-22 05:48:56 +00:00
renovate[bot]
1387e174d7 chore(deps): update ivuorinen/actions action (v2026.01.13 → v2026.01.20) (#157)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-21 01:46:58 +00:00
renovate[bot]
7bf58ed7d4 fix(deps): update module github.com/sirupsen/logrus (v1.9.3 → v1.9.4) (#156)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-17 04:28:57 +00:00
renovate[bot]
b607ad8af4 chore(deps): update actions/setup-go action (v6.1.0 → v6.2.0) (#155)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-14 09:41:34 +00:00
renovate[bot]
89d16ad90b chore(deps): update ivuorinen/actions action (v2026.01.12 → v2026.01.13) (#154)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-14 04:35:30 +00:00
renovate[bot]
d9eed9b972 chore(deps): update github/codeql-action action (v4.31.9 → v4.31.10) (#153)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-13 10:34:18 +00:00
renovate[bot]
e7b3b82816 chore(deps): update ivuorinen/actions action (v2026.01.09 → v2026.01.12) (#152)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-13 04:57:22 +00:00
renovate[bot]
894ac72908 fix(deps): update module golang.org/x/text (v0.32.0 → v0.33.0) (#151)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-10 09:31:26 +00:00
renovate[bot]
6fcdcd2ea1 chore(deps): update ivuorinen/actions action (v2026.01.08 → v2026.01.09) (#150)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-10 05:30:03 +00:00
renovate[bot]
248e30cdf7 chore(deps)!: update ivuorinen/actions (v2025.12.31 → v2026.01.08) (#149) 2026-01-09 00:33:05 +02:00
renovate[bot]
d8eda9d6bb chore(deps): update ivuorinen/actions action (v2025.12.30 → v2025.12.31) (#148)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-01 04:38:55 +00:00
renovate[bot]
928632f5bc chore(deps): update ivuorinen/actions action (v2025.12.29 → v2025.12.30) (#147)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-31 04:59:40 +00:00
renovate[bot]
e5f1ccb1b4 chore(deps): update ivuorinen/actions action (v2025.12.28 → v2025.12.29) (#146)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-30 05:04:59 +00:00
renovate[bot]
a078916f3c chore(deps): update ivuorinen/actions action (v2025.12.27 → v2025.12.28) (#145)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-29 01:11:44 +00:00
renovate[bot]
e4d15bd590 fix(deps): update module github.com/schollz/progressbar/v3 (v3.18.0 → v3.19.0) (#144)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-28 21:35:19 +00:00
renovate[bot]
b2b3bae86b chore(deps): update ivuorinen/actions action (v2025.12.22 → v2025.12.27) (#143)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-28 17:37:36 +00:00
renovate[bot]
dd10f78aa8 chore(deps): update ivuorinen/actions action (v2025.12.21 → v2025.12.22) (#142)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-23 02:07:40 +00:00
renovate[bot]
e6d8b39fe7 chore(deps): update ivuorinen/actions action (v2025.12.20 → v2025.12.21) (#141)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-22 02:46:22 +00:00
renovate[bot]
6f0336eae4 chore(deps): update ivuorinen/actions action (v2025.12.19 → v2025.12.20) (#140)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-21 08:46:24 +00:00
renovate[bot]
407dd44725 chore(deps): update docker/setup-buildx-action action (v3.11.1 → v3.12.0) (#139)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-20 06:31:08 +00:00
renovate[bot]
7fe10fa4ce chore(deps): update ivuorinen/actions action (v2025.12.18 → v2025.12.19) (#138)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-20 02:08:57 +00:00
renovate[bot]
f1587ec640 chore(deps): update image alpine to v3.23.2 (#137)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 09:41:36 +00:00
renovate[bot]
99d08a6984 chore(deps): update ivuorinen/actions action (v2025.12.17 → v2025.12.18) (#136)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 05:44:59 +00:00
renovate[bot]
3c015d69e7 chore(deps): update ivuorinen/actions action (v2025.12.16 → v2025.12.17) (#135)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-18 01:13:21 +00:00
renovate[bot]
bb843d4b4a chore(deps): update github/codeql-action action (v4.31.8 → v4.31.9) (#134)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-17 06:35:20 +00:00
renovate[bot]
b47b9514a4 chore(deps): update ivuorinen/actions action (v2025.12.15 → v2025.12.16) (#133)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-17 04:15:33 +00:00
renovate[bot]
83b57a9846 chore(deps): update ivuorinen/actions action (v2025.12.14 → v2025.12.15) (#132)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-16 02:59:56 +00:00
renovate[bot]
b2444f5187 chore(deps): update ivuorinen/actions action (v2025.12.13 → v2025.12.14) (#131)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 02:45:24 +00:00
renovate[bot]
7c1aa2e218 chore(deps): update ivuorinen/actions action (v2025.12.12 → v2025.12.13) (#130)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-14 06:04:48 +00:00
renovate[bot]
31b5375aa0 chore(deps)!: update actions/upload-artifact (v5.0.0 → v6.0.0) (#127) 2025-12-13 11:55:36 +02:00
renovate[bot]
6e089badde chore(deps): update github/codeql-action action (v4.31.7 → v4.31.8) (#129)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-13 09:07:58 +00:00
renovate[bot]
75641223b4 chore(deps): update ivuorinen/actions action (v2025.12.11 → v2025.12.12) (#128)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-13 04:37:33 +00:00
renovate[bot]
b8963713d4 chore(deps): update securego/gosec action (v2.22.10 → v2.22.11) (#126)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 06:14:05 +00:00
renovate[bot]
04e803789c chore(deps): update ivuorinen/actions action (v2025.12.10 → v2025.12.11) (#125)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 02:39:29 +00:00
22 changed files with 148 additions and 280 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* ivuorinen

View File

@@ -10,7 +10,7 @@ runs:
using: "composite"
steps:
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: ".go-version"
cache: true

View File

@@ -26,7 +26,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: ./.github/actions/setup
@@ -57,7 +57,7 @@ jobs:
- name: Upload test results
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: test-results
path: test-results.json
@@ -96,7 +96,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: ./.github/actions/setup
@@ -122,7 +122,7 @@ jobs:
done
- name: Upload artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: gibidify-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
@@ -139,7 +139,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: ./.github/actions/setup
@@ -147,7 +147,7 @@ jobs:
token: ${{ github.token }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to GitHub Container Registry
run: |

View File

@@ -1,40 +1,34 @@
---
name: CodeQL Analysis
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "CodeQL"
on:
push:
branches: [main, develop]
branches: ["main"]
pull_request:
branches: [main, develop]
branches: ["main"]
schedule:
- cron: "30 1 * * 0"
merge_group:
permissions: {}
jobs:
analyze:
name: Analyze Code
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
actions: read
contents: read
packages: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["actions", "go"]
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Go
uses: ./.github/actions/setup
- name: CodeQL Analysis
uses: ivuorinen/actions/codeql-analysis@1da3a0e79fcd7da6bed9ee1979f1449ba11f58f9 # v2026.03.14
with:
token: ${{ github.token }}
- name: Initialize CodeQL
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
language: ${{ matrix.language }}
queries: security-and-quality

View File

@@ -22,11 +22,11 @@ jobs:
statuses: write
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: ./.github/actions/setup
with:
token: ${{ github.token }}
- uses: ivuorinen/actions/pr-lint@7aa206a02a0f9bef6f173a881bcc3ac2aa802917 # v2025.12.10
- uses: ivuorinen/actions/pr-lint@1da3a0e79fcd7da6bed9ee1979f1449ba11f58f9 # v2026.03.14

View File

@@ -24,7 +24,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: ./.github/actions/setup
@@ -33,12 +33,12 @@ jobs:
# Security Scanning with gosec
- name: Run gosec Security Scanner
uses: securego/gosec@6be2b51fd78feca86af91f5186b7964d76cb1256 # v2.22.10
uses: securego/gosec@bb17e422fc34bf4c0a2e5cab9d07dc45a68c040c # v2.24.7
with:
args: "-fmt sarif -out gosec-results.sarif ./..."
- name: Upload gosec results to GitHub Security tab
uses: github/codeql-action/upload-sarif@cf1bb45a277cb3c205638b2cd5c984db1c46a412 # v4.31.7
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
if: always()
with:
sarif_file: gosec-results.sarif
@@ -87,7 +87,7 @@ jobs:
# Upload artifacts for review
- name: Upload security scan results
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: security-scan-results

View File

@@ -22,4 +22,4 @@ jobs:
issues: write
runs-on: ubuntu-latest
steps:
- uses: ivuorinen/actions/sync-labels@7aa206a02a0f9bef6f173a881bcc3ac2aa802917 # v2025.12.10
- uses: ivuorinen/actions/sync-labels@1da3a0e79fcd7da6bed9ee1979f1449ba11f58f9 # v2026.03.14

2
.gitignore vendored
View File

@@ -14,6 +14,8 @@ output.txt
output.yaml
gosec-report.json
govulncheck-report.json
gitleaks-report.json
security-report.json
security-report.md
gosec*.log
pr.txt

15
.gitleaks.toml Normal file
View File

@@ -0,0 +1,15 @@
# gitleaks configuration
# https://github.com/gitleaks/gitleaks
#
# Extends the built-in ruleset. Only allowlist overrides are defined here.
[allowlist]
description = "Global allowlist for generated and report files"
paths = [
'''gosec-report\.json$''',
'''govulncheck-report\.json$''',
'''security-report\.json$''',
'''security-report\.md$''',
'''output\.json$''',
'''gibidify\.json$''',
]

View File

@@ -1 +1 @@
1.25.5
1.26.1

View File

@@ -3,7 +3,7 @@
# For more hooks, see https://pre-commit.com/hooks.html
repos:
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.6.0
rev: 3.6.1
hooks:
- id: editorconfig-checker
alias: ec

View File

@@ -1,5 +1,5 @@
# Use a minimal base image
FROM alpine:3.23.0
FROM alpine:3.23.3
# Add user
RUN useradd -ms /bin/bash gibidify

View File

@@ -1,68 +0,0 @@
package cli
import "testing"
// terminalEnvSetup defines environment variables for terminal detection tests.
type terminalEnvSetup struct {
Term string
CI string
GitHubActions string
NoColor string
ForceColor string
}
// apply sets up the environment variables using t.Setenv.
func (e terminalEnvSetup) apply(t *testing.T) {
t.Helper()
// Always set all environment variables to ensure isolation
// Empty string explicitly unsets the variable in the test environment
t.Setenv("TERM", e.Term)
t.Setenv("CI", e.CI)
t.Setenv("GITHUB_ACTIONS", e.GitHubActions)
t.Setenv("NO_COLOR", e.NoColor)
t.Setenv("FORCE_COLOR", e.ForceColor)
}
// Common terminal environment setups for reuse across tests.
var (
envDefaultTerminal = terminalEnvSetup{
Term: "xterm-256color",
CI: "",
NoColor: "",
ForceColor: "",
}
envDumbTerminal = terminalEnvSetup{
Term: "dumb",
}
envCIWithoutGitHub = terminalEnvSetup{
Term: "xterm",
CI: "true",
GitHubActions: "",
}
envGitHubActions = terminalEnvSetup{
Term: "xterm",
CI: "true",
GitHubActions: "true",
NoColor: "",
}
envNoColor = terminalEnvSetup{
Term: "xterm-256color",
CI: "",
NoColor: "1",
ForceColor: "",
}
envForceColor = terminalEnvSetup{
Term: "dumb",
ForceColor: "1",
}
envEmptyTerm = terminalEnvSetup{
Term: "",
}
)

View File

@@ -1,42 +0,0 @@
package cli
// Test constants to avoid duplication in test files.
// These constants are used across multiple test files in the cli package.
const (
// Error messages
testErrFileNotFound = "file not found"
testErrPermissionDenied = "permission denied"
testErrInvalidFormat = "invalid format"
testErrOther = "other error"
testErrEncoding = "encoding error"
testErrSourceRequired = "source directory is required"
testErrPathTraversal = "path traversal attempt detected"
testPathTraversalPath = "../../../etc/passwd"
// Suggestion messages
testSuggestionsHeader = "Suggestions:"
testSuggestCheckPerms = "Check file/directory permissions"
testSuggestVerifyPath = "Verify the path is correct"
testSuggestFormat = "Use a supported format: markdown, json, yaml"
testSuggestFormatEx = "Example: -format markdown"
testSuggestCheckArgs = "Check your command line arguments"
testSuggestHelp = "Run with --help for usage information"
testSuggestDiskSpace = "Verify available disk space"
testSuggestReduceConcur = "Try with -concurrency 1 to reduce resource usage"
// UI test strings
testWithColors = "with colors"
testWithoutColors = "without colors"
testProcessingMsg = "Processing files"
// Flag names
testFlagSource = "-source"
testFlagConcurrency = "-concurrency"
// Test file paths
testFilePath1 = "/test/file1.go"
testFilePath2 = "/test/file2.go"
// Output markers
testErrorSuffix = " Error"
)

View File

@@ -0,0 +1,45 @@
# Replace check_secrets with gitleaks
## Problem
The `check_secrets` function in `scripts/security-scan.sh` uses hand-rolled regex
patterns that produce false positives. The pattern `key\s*[:=]\s*['"][^'"]{8,}['"]`
matches every `configKey: "backpressure.maxPendingFiles"` line in
`config/getters_test.go` (40+ matches), causing `make security-full` to fail.
The git history check (`git log --oneline -10 | grep -i "key|token"`) also matches
on benign commit messages containing words like "key" or "token".
## Decision
Replace the custom `check_secrets` function with
[gitleaks](https://github.com/gitleaks/gitleaks), a widely adopted Go-based secret
scanner with built-in rules for AWS keys, GitHub tokens, private keys, high-entropy
strings, and more.
## Approach
- **Drop-in replacement**: Only the `check_secrets` function body changes. The
function signature and return behavior (0 = clean, 1 = findings) remain identical.
- **`go run` invocation**: Use `go run github.com/gitleaks/gitleaks/v8@latest` so
the tool is fetched automatically if not cached. No changes to `install-tools.sh`.
- **Working tree scan only**: Use `gitleaks dir` to scan current files. No git
history scanning (matches current script behavior scope).
- **Config file**: A `.gitleaks.toml` at the project root extends gitleaks' built-in
rules with an allowlist to suppress known false positives in test files.
- **CI unaffected**: `.github/workflows/security.yml` runs its own inline steps
(gosec, govulncheck, checkmake, shfmt, yamllint, Trivy) and does not call
`security-scan.sh` or `check_secrets`.
## Files Changed
| File | Change |
|------|--------|
| `scripts/security-scan.sh` | Replace `check_secrets` function body |
| `.gitleaks.toml` | New file -- gitleaks configuration with allowlist |
## Verification
```bash
make security-full # should pass end-to-end
```

View File

@@ -31,54 +31,6 @@ func writeTempConfig(t *testing.T, content string) string {
return dir
}
// collectWriteRequests runs a processing function and collects all WriteRequests.
// This helper wraps the common pattern of channel + goroutine + WaitGroup.
func collectWriteRequests(t *testing.T, process func(ch chan fileproc.WriteRequest)) []fileproc.WriteRequest {
t.Helper()
ch := make(chan fileproc.WriteRequest, 10)
var wg sync.WaitGroup
wg.Go(func() {
defer close(ch)
process(ch)
})
results := make([]fileproc.WriteRequest, 0)
for req := range ch {
results = append(results, req)
}
wg.Wait()
return results
}
// collectWriteRequestsWithContext runs a processing function with context and collects all WriteRequests.
func collectWriteRequestsWithContext(
ctx context.Context,
t *testing.T,
process func(ctx context.Context, ch chan fileproc.WriteRequest) error,
) ([]fileproc.WriteRequest, error) {
t.Helper()
ch := make(chan fileproc.WriteRequest, 10)
var processErr error
var wg sync.WaitGroup
wg.Go(func() {
defer close(ch)
processErr = process(ctx, ch)
})
results := make([]fileproc.WriteRequest, 0)
for req := range ch {
results = append(results, req)
}
wg.Wait()
return results, processErr
}
func TestProcessFile(t *testing.T) {
// Reset and load default config to ensure proper file size limits
testutil.ResetViperConfig(t, "")

View File

@@ -51,7 +51,7 @@ func (rm *ResourceMonitor) CreateFileProcessingContext(parent context.Context) (
return parent, func() {}
}
return context.WithTimeout(parent, rm.fileProcessingTimeout)
return context.WithTimeout(parent, rm.fileProcessingTimeout) // #nosec G118 - cancel returned to caller
}
// CreateOverallProcessingContext creates a context with overall processing timeout.
@@ -64,5 +64,5 @@ func (rm *ResourceMonitor) CreateOverallProcessingContext(parent context.Context
return parent, func() {}
}
return context.WithTimeout(parent, rm.overallTimeout)
return context.WithTimeout(parent, rm.overallTimeout) // #nosec G118 - cancel returned to caller
}

View File

@@ -1,12 +0,0 @@
package fileproc
// Test constants to avoid duplication in test files.
// These constants are used across multiple test files in the fileproc package.
const (
// Backpressure configuration keys
testBackpressureEnabled = "backpressure.enabled"
testBackpressureMaxMemory = "backpressure.maxMemoryUsage"
testBackpressureMemoryCheck = "backpressure.memoryCheckInterval"
testBackpressureMaxFiles = "backpressure.maxPendingFiles"
testBackpressureMaxWrites = "backpressure.maxPendingWrites"
)

16
go.mod
View File

@@ -1,20 +1,22 @@
module github.com/ivuorinen/gibidify
go 1.25
go 1.25.0
toolchain go1.26.1
require (
github.com/fatih/color v1.18.0
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/schollz/progressbar/v3 v3.18.0
github.com/sirupsen/logrus v1.9.3
github.com/schollz/progressbar/v3 v3.19.0
github.com/sirupsen/logrus v1.9.4
github.com/spf13/viper v1.21.0
golang.org/x/text v0.32.0
golang.org/x/text v0.35.0
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
@@ -26,7 +28,7 @@ require (
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/term v0.38.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/term v0.39.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)

26
go.sum
View File

@@ -9,8 +9,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro=
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -37,10 +37,10 @@ github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDj
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4=
github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI=
github.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA=
github.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/schollz/progressbar/v3 v3.19.0 h1:Ea18xuIRQXLAUidVDox3AbwfUhD0/1IvohyTutOIFoc=
github.com/schollz/progressbar/v3 v3.19.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
@@ -51,21 +51,19 @@ github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY=
golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww=
golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8=
golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View File

@@ -86,7 +86,7 @@ check_dependencies() {
if ! command -v checkmake &>/dev/null; then
print_warning "checkmake not found, installing..."
go install github.com/checkmake/checkmake/cmd/checkmake@v0.2.2
go install github.com/mrtazz/checkmake/cmd/checkmake@v0.2.2
fi
if ! command -v eclint &>/dev/null; then
@@ -99,11 +99,6 @@ check_dependencies() {
go install honnef.co/go/tools/cmd/staticcheck@v0.6.1
fi
if ! command -v yamllint &>/dev/null; then
print_warning "yamllint not found, installing..."
go install mvdan.cc/yaml/cmd/yaml-lint@v2.4.0
fi
# Formatting tools
if ! command -v gofumpt &>/dev/null; then

View File

@@ -63,44 +63,25 @@ run_security_lint() {
fi
}
# Check for potential secrets
# Check for potential secrets using gitleaks
check_secrets() {
print_status "Scanning for potential secrets and sensitive data..."
print_status "Scanning for potential secrets and sensitive data with gitleaks..."
local secrets_found=false
# Common secret patterns
local patterns=(
"password\s*[:=]\s*['\"][^'\"]{3,}['\"]"
"secret\s*[:=]\s*['\"][^'\"]{3,}['\"]"
"key\s*[:=]\s*['\"][^'\"]{8,}['\"]"
"token\s*[:=]\s*['\"][^'\"]{8,}['\"]"
"api_?key\s*[:=]\s*['\"][^'\"]{8,}['\"]"
"aws_?access_?key"
"aws_?secret"
"AKIA[0-9A-Z]{16}" # AWS Access Key pattern
"github_?token"
"private_?key"
)
for pattern in "${patterns[@]}"; do
if grep -r -i -E "$pattern" --include="*.go" . 2>/dev/null; then
print_warning "Potential secret pattern found: $pattern"
secrets_found=true
fi
done
# Check git history for secrets (last 10 commits)
if git log --oneline -10 | grep -i -E "(password|secret|key|token)" >/dev/null 2>&1; then
print_warning "Potential secrets mentioned in recent commit messages"
secrets_found=true
fi
if [[ "$secrets_found" = true ]]; then
print_warning "Potential secrets detected. Please review manually."
return 1
local gitleaks_report="gitleaks-report.json"
if go run github.com/zricethezav/gitleaks/v8@latest dir \
--config .gitleaks.toml \
--report-format json \
--report-path "$gitleaks_report" \
--no-banner \
.; then
print_success "No secrets detected by gitleaks"
rm -f "$gitleaks_report"
else
print_success "No obvious secrets detected"
print_error "Secrets detected by gitleaks!"
if [[ -f "$gitleaks_report" ]]; then
echo "Detailed report saved to $gitleaks_report"
fi
return 1
fi
}
@@ -235,11 +216,14 @@ check_yaml_files() {
print_status "Checking YAML files..."
if find . -name "*.yml" -o -name "*.yaml" -type f | head -1 | grep -q .; then
if yamllint -c .yamllint .; then
if command -v yamllint >/dev/null 2>&1; then
if ! yamllint -c .yamllint .; then
print_error "YAML file issues detected!"
return 1
fi
print_success "YAML files check passed"
else
print_error "YAML file issues detected!"
return 1
print_warning "yamllint not found, skipping YAML file check"
fi
else
print_status "No YAML files found, skipping yamllint check"
@@ -268,7 +252,7 @@ generate_report() {
- checkmake (Makefile linting)
- shfmt (Shell script formatting)
- yamllint (YAML file validation)
- Custom secret detection
- gitleaks (Secret detection)
- Custom network address detection
- Docker security checks
- File permission checks
@@ -276,6 +260,7 @@ generate_report() {
### Files Generated
- \`gosec-report.json\` - Detailed gosec security findings
- \`govulncheck-report.json\` - Dependency vulnerability report
- \`gitleaks-report.json\` - Secret detection findings (if any)
### Recommendations
1. Review all security findings in the generated reports
@@ -350,6 +335,7 @@ main() {
print_status "Generated reports:"
print_status "- gosec-report.json (if exists)"
print_status "- govulncheck-report.json (if exists)"
print_status "- gitleaks-report.json (if exists)"
print_status "- security-report.md"
fi