Skip to content

Allow patterns for secret detection to be customized #171

@jodyheavener

Description

@jodyheavener

Summary

We maintain a list of regular expressions to help detect secrets within your open files in VS Code. There will always be room to expand this list, and in some the extension may encounter a false positive. It would be nice if an individual could customize this list to not disable certain patterns, but add their own pattern.

Use cases

  • User regularly works in code that results in false positives for a specific secret pattern, and disables it as a result so it does not impact their development workflow
  • User works for a company that has a special type of token known only to them. They add a pattern to match this token.

Proposed solution

Add two new settings:

  • One storing and listing disabled patterns by name
    • The ability to disable a pattern should be presented as a CodeLens next to the existing CL offering to save. For example "Save in 1Password • Ignore pattern"
  • One storing custom pattern regexps
    • The settings will hold the patterns, which will be merged into the existing pattern list
    • Possibly include an option to store a name and field alongside the pattern that is suggested as the item and field values

Is there a workaround to accomplish this today?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions