Add secret input guard: never ask for secrets in conversation#41
Add secret input guard: never ask for secrets in conversation#41
Conversation
Secrets must be obtained via tmp file workflow — user edits with their editor, value is transferred to staging in a subshell without leaking. - CLAUDE.md: add always-active guard rule in Security section - secrets.md: add "Obtaining Secrets from User" section with tmp file workflow, add to PROHIBITED list, fix staging cleanup chaining Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the security posture around handling sensitive information by introducing a robust, secure workflow for obtaining secrets from users. It establishes a clear policy that prevents direct secret input in conversational interfaces, instead guiding users through a temporary file and editor-based process to safeguard credentials. This change ensures that secret values are never exposed in conversation logs or directly handled by the system in an insecure manner. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new secure workflow for obtaining secrets from users by guiding them to edit a temporary file instead of directly inputting values into the conversation. It also updates the .claude/CLAUDE.md and .claude/rules/secrets.md documentation to reflect this new process and explicitly prohibit asking for secrets in conversation. The review comments suggest clarifying the placeholder for KEY_NAME in the instructions and address a potential issue where the tr -d '\n' command could corrupt multi-line secret values, proposing a modification or validation step.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5e627e9cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Remove `tr -d '\n'` — `printf %q` already escapes newlines correctly, so multiline values like PEM keys are preserved. Also remove the blank line from the heredoc template so `$()` command substitution cleanly strips the trailing newline without leaving a leading blank in the value. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Context
secrets.mdis conditionally loaded (alwaysApply: false), so the CLAUDE.md guard ensures the rule is active even before any secrets file is touched.Test plan
🤖 Generated with Claude Code