Skip to content
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

It should detect multi-line secrets #73

Closed
pburkholder opened this issue May 21, 2022 · 1 comment · Fixed by #74
Closed

It should detect multi-line secrets #73

pburkholder opened this issue May 21, 2022 · 1 comment · Fixed by #74

Comments

@pburkholder
Copy link
Contributor

Back with gitleaks 7.x we had this test:

@test "it fails a flask secret key" {
  cat > $REPO_PATH/webapp.py <<END
    app.secret_key = (
        '39a45464-cb1d-4b8d-aa1f-83c7c04fa673'
    )
END
    run testCommit $REPO_PATH
    should_fail
}

But that stopped working in 8.8.4.

For now I've changed the test to single line, but it would be good to detect across the newline.

I don't know if this is a bug/feature in 8.8.4 or perhaps in Go regexes.

Security considerations

  1. This issue is safe, 2. Fixing this is a good thing
@markdboyd
Copy link
Contributor

This might be fixed by 16a52d8. Let me know what you think.

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 a pull request may close this issue.

2 participants