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

Secret Masking #1643

Open
akshaypatidar1999 opened this issue Mar 24, 2025 · 3 comments
Open

Secret Masking #1643

akshaypatidar1999 opened this issue Mar 24, 2025 · 3 comments

Comments

@akshaypatidar1999
Copy link

Feature request

The secrets should be masked before sending data to AI models for security

Motivation

Some repositories may contain sensitive information which should not be shared with AI models so these should be masked before sending data to ai model

Copy link
Contributor

💡 Auto-generated documentation-based answer:

This feature request is already addressed in PR-Agent/Qodo Merge through the "ignore" configuration options that allow you to exclude specific files or patterns from analysis.

You can ignore files or folders containing sensitive information using either glob patterns or regex patterns:

  1. Using glob patterns:
[ignore]
glob = ['**/secrets/*', '*.env']
  1. Using regex patterns:
[ignore]
regex = ['.*secret.*', '.*password.*']

These configurations can be set in your configuration file or passed as command-line arguments. For example:

/review --ignore.glob="['*.env']"

This ensures that sensitive files or files matching specific patterns are excluded from the data sent to AI models, effectively masking secrets from the analysis process.

Relevant Sources:

@akshaypatidar1999
Copy link
Author

akshaypatidar1999 commented Mar 24, 2025

Thanks while this helps can we look into integrating tools like llm guard as well
https://github.com/protectai/llm-guard?tab=readme-ov-file

@mrT23
Copy link
Collaborator

mrT23 commented Mar 29, 2025

Hi @akshaypatidar1999

Sensitive data should never be committed to git. Never.

For 'chat-gpt-in-ide' tools, I can understand why a masking feature might be needed - you are working in an intermediate state, and you might have local uncommitted files.

But for PRs, secrets should not appear. if they do, PR-Agent should give an alert.
If we start masking the PR content to the AI, PR-Agent will fail to alert on that, as it should.

In addition, most AI providers today support zero data retention, so the harm of sending "sensitive" data (on the very rare unusual cases it might occur) is low.

@mrT23 mrT23 added the answered label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants