Skip to content

Reduce aws-access-token false positives#1876

Merged
zricethezav merged 3 commits into
gitleaks:masterfrom
leaktk:aws-access-key-id
May 27, 2025
Merged

Reduce aws-access-token false positives#1876
zricethezav merged 3 commits into
gitleaks:masterfrom
leaktk:aws-access-key-id

Conversation

@bplaxco
Copy link
Copy Markdown
Contributor

@bplaxco bplaxco commented May 27, 2025

Description:

Adjust aws-access-token regex

AWS Access Key IDs are base32 encoded so the numerical values here will only be 2-7

Update config/gitleaks.toml during build and test

Summary:

  • Add config/gitleaks.toml make target
  • Make it a dep of build and test
  • Update CONTRIBUTING.md to reference the new target

Reason: Makes dev easier because you can just tweak the code and run make test without an extra step.

Resolve lint issues in cmd/diagnostics.go

$ golangci-lint run cmd/
cmd/diagnostics.go:128:10: Error return value of `f.Close` is not checked (errcheck)
                f.Close()
                       ^
cmd/diagnostics.go:191:10: Error return value of `f.Close` is not checked (errcheck)
                f.Close()
                       ^
2 issues:
* errcheck: 2

Checklist:

  • Does your PR pass tests?
  • Have you written new tests for your changes? (N/A)
  • Have you lint your code locally prior to submission?

bplaxco added 3 commits May 27, 2025 10:14
Summary:

- Add `config/gitleaks.toml` make target
- Make it a dep of `build` and `test`
- Update CONTRIBUTING.md to reference the new target

Reason: Makes dev easier because you can just tweak the code and run
`make test` without an extra step.
```
$ golangci-lint run cmd/
cmd/diagnostics.go:128:10: Error return value of `f.Close` is not checked (errcheck)
                f.Close()
                       ^
cmd/diagnostics.go:191:10: Error return value of `f.Close` is not checked (errcheck)
                f.Close()
                       ^
2 issues:
* errcheck: 2
```
@zricethezav
Copy link
Copy Markdown
Collaborator

@zricethezav zricethezav merged commit d29ee55 into gitleaks:master May 27, 2025
2 checks passed
@bplaxco bplaxco deleted the aws-access-key-id branch November 19, 2025 16:33
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.

2 participants