8000 Prevent Yocto/BitBake false positives with generic-api-key rule by Okeanos · Pull Request #1783 · gitleaks/gitleaks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Prevent Yocto/BitBake false positives with generic-api-key rule #1783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

Okeanos
Copy link
Contributor
@Okeanos Okeanos commented Mar 10, 2025

Description:

This PR implements exceptions to the generic-api-key rule to prevent false positives experienced with Yocto/BitBake projects as explained in #1775

Checklist:

  • Does your PR pass tests?
  • Have you written new tests for your changes?
  • Have you lint your code locally prior to submission?

Okeanos added 2 commits March 10, 2025 23:00
…chCondition

https://pkg.go.dev/text/template#hdr-Actions

> {{with pipeline}} T1 {{end}}
>	If the value of the pipeline is empty, no output is generated;
>	otherwise, dot is set to the value of the pipeline and T1 is
>	executed.

Within the `with` block `.MatchCondition` is implicit and must be omitted to
work. The fault/bug was not triggered before because this is the first
non-default MatchCondition apparently.
[[rules.allowlists]]
condition = "AND"
paths = [
'''\.bb$''','''\.bbappend$''','''\.bbclass$''','''\.inc$''',
Copy link
Collaborator

Choose a reason for hiding this comment

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

outside of the scope for this PR but it would be nice if this formatting matched the other toml arrays where each line has an entry

@zricethezav
Copy link
Collaborator

nice work @Okeanos! Thanks for this PR

@zricethezav zricethezav merged commit 991a940 into gitleaks:master Mar 11, 2025
2 checks passed
sirakav pushed a commit to sirakav/gitleaks that referenced this pull request Apr 25, 2025
…eaks#1783)

* fix: make config template work when providing non-iota values for MatchCondition

https://pkg.go.dev/text/template#hdr-Actions

> {{with pipeline}} T1 {{end}}
>	If the value of the pipeline is empty, no output is generated;
>	otherwise, dot is set to the value of the pipeline and T1 is
>	executed.

Within the `with` block `.MatchCondition` is implicit and must be omitted to
work. The fault/bug was not triggered before because this is the first
non-default MatchCondition apparently.

* feat: exclude false positive matches for Yocto/Bitbake from generic-api-key rule

Fixes gitleaks#1775
alayne222 pushed a commit to alayne222/gitleaks that referenced this pull request May 28, 2025
…eaks#1783)

* fix: make config template work when providing non-iota values for MatchCondition

https://pkg.go.dev/text/template#hdr-Actions

> {{with pipeline}} T1 {{end}}
>	If the value of the pipeline is empty, no output is generated;
>	otherwise, dot is set to the value of the pipeline and T1 is
>	executed.

Within the `with` block `.MatchCondition` is implicit and must be omitted to
work. The fault/bug was not triggered before because this is the first
non-default MatchCondition apparently.

* feat: exclude false positive matches for Yocto/Bitbake from generic-api-key rule

Fixes gitleaks#1775
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
0