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

Feature request: Check for RFC 8959 "secret-token" scheme #940

Closed
Zash opened this issue Aug 1, 2023 · 1 comment
Closed

Feature request: Check for RFC 8959 "secret-token" scheme #940

Zash opened this issue Aug 1, 2023 · 1 comment

Comments

@Zash
Copy link

Zash commented Aug 1, 2023

RFC 8959 registers the secret-token: URI scheme with the intent of establishing a common syntax for authentication tokens and making it easier to detect tokens and prevent them from leaking into e.g. version control systems.

Seems a natural fit for this project, given it already has checks for private keys and AWS credentials.

@mxr
Copy link
Member

mxr commented Sep 6, 2023

This can be done with a pygrep hook. Try this as a starting point:

-   id: no-secret-token
    name: no secret-token
    description: 'Forbid secret-token:[...] as it is likely a secret'

    # warning - this is untested 
    entry: "secret-token:([A-Za-z0-9-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+"

    language: pygrep
    types: [text]

@mxr mxr closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants