Skip to content

docs(#6499): add credential-redaction invariant to Go contributing guide - #6500

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6499-credential-redaction-docs
Open

docs(#6499): add credential-redaction invariant to Go contributing guide#6500
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/6499-credential-redaction-docs

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Context

Retro finding from PR #6495 (feedback_mode for the validation loop). The code agent's original implementation passed validation output raw — no credential redaction, permissive file permissions, and naive byte-slice truncation. The human reviewer force-pushed amendments adding redactFeedback, sensitiveEnvKey, minRedactableSecretLen, truncateUTF8, and restrictive permissions. This guidance ensures future runner features follow the established security pattern.

Testing

Documentation-only change — no Go production code modified. Verified:


Closes #6499

Post-script verification

  • Branch is not main/master (agent/6499-credential-redaction-docs)
  • Secret scan passed (gitleaks — 7015bfd31f5553401462c9cdcaa1816a3dda1942..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Add a "Security: credential redaction for external content" section
to docs/contributing/go-code.md documenting four invariants for
runner features that process external content (validation output,
CI logs, script stdout/stderr) before injecting it into LLM
prompts, logging, or file storage:

1. Scan RunnerEnv for credential literal values, replacing with
   [REDACTED:<key>] via sensitiveEnvKey classification, skipping
   values shorter than minRedactableSecretLen (8)
2. Apply security.SecretRedactor pattern scan as second-pass
   fallback for credentials not in RunnerEnv
3. Use truncateUTF8 (not byte slicing) for size limits to avoid
   splitting multi-byte runes
4. Write files containing potential secrets with mode 0600

Reference redactFeedback in internal/cli/run.go as the canonical
implementation pattern. Cross-reference #2107 (replicate existing
security patterns) and #2872 (post-script security invariants).

Update the AGENTS.md topic index to mention credential redaction
so agents discover the guidance when reading for Go changes.

Note: pre-commit could not run (sandbox network policy blocks
git fetch for hook environment setup). Manual review confirms
markdown formatting follows existing conventions.

Closes #6499
@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://fb2dadcd-site.fullsend-ai.workers.dev

Commit: d5a54319903a1b0589b9633bcf63bad95c93e2c4

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 22, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:59 PM UTC · Completed 10:13 PM UTC

Commit: d5a5431 · View workflow run →

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

Low

  • [heading format] docs/contributing/go-code.md:236 — The new section heading ## Security: credential redaction for external content uses a colon-separated Category: subtitle pattern that no other ## heading in this file uses. Existing headings are plain noun phrases or gerund phrases (## WASM binary size constraints, ## Concurrency testing (race detection), ## Error handling and naming conventions, etc.).
    Remediation: Rephrase to match the existing noun-phrase style, e.g., ## Credential redaction for external content.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

Comment thread AGENTS.md
| File | When to read |
|------|-------------|
| [Go Code](docs/contributing/go-code.md) | Changing Go code under `cmd/` or `internal/` — covers mint sync, coverage, vet, e2e tests, concurrency testing, suite-timeout policy, WASM binary size constraints, and preferring `go run` for the CLI |
| [Go Code](docs/contributing/go-code.md) | Changing Go code under `cmd/` or `internal/` — covers mint sync, coverage, vet, e2e tests, concurrency testing, suite-timeout policy, WASM binary size constraints, credential redaction for external content, and preferring `go run` for the CLI |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] protected-path

This PR modifies AGENTS.md, which is a protected governance file. The PR links to issue #6499 which explicitly authorizes the table entry update, and the PR body explains the rationale. Human approval is always required for protected-path changes, regardless of context.


When multiple code paths produce errors for the same condition across different forges or providers, ensure they mention the same remediation options. For example, if one "no token found" error suggests both the environment variable and the `--token` flag, other forge-specific token errors should do the same — so users see consistent guidance regardless of which code path triggers.

## Security: credential redaction for external content

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] pattern-inconsistency

The new section heading '## Security: credential redaction for external content' uses a colon-separated Category: subtitle pattern that no other ## heading in this file uses. Existing headings are plain noun phrases or gerund phrases.

Suggested fix: Rephrase to match the existing noun-phrase style, e.g., '## Credential redaction for external content'.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Agent PR ready for human review requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add credential-redaction invariant to Go contributing guide for runner features processing external content

0 participants