Skip to content

docs(assurance): correct API key storage claims - #1449

Draft
Frank-zhu0404 wants to merge 1 commit into
alibaba:mainfrom
Frank-zhu0404:docs/issue-1440-assurance-api-key-claim
Draft

Frank-zhu0404 wants to merge 1 commit into
alibaba:mainfrom
Frank-zhu0404:docs/issue-1440-assurance-api-key-claim

Conversation

@Frank-zhu0404

Copy link
Copy Markdown

Description

ASSURANCE_CASE.md claimed API keys are env-only and never stored in config files. The CLI actually persists api_key / auth_token to ~/.opencodereview/config.json with mode 0600 (saveConfig in cmd/opencodereview/provider_cmd.go).

This PR aligns the assurance case with real credential sources:

  1. Environment variables (OCR_LLM_TOKEN, provider-specific vars)
  2. Credential commands (api_key_cmd / auth_token_cmd)
  3. Optional plaintext persistence in the user config file (mode 0600)

Also updates Threat T2, Fail-safe defaults, Separation of privilege, and OWASP A07 rows to match.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

Docs-only change. Verified claims against saveConfig / config path behavior and grepped that no other mirrored "env-only / never in config" assurance statements remain in ASSURANCE_CASE.md. Ran go run scripts/verify-english-only.go (pass).

  • make test passes locally
  • Manual testing (describe below)

Cross-checked threat table + Saltzer/Schroeder + OWASP A07 wording against CLI config persistence (0600) and masking on ocr config set display.

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA
  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

AI disclosure: assisted by Grokbuild (Grok 4.6) for drafting the ASSURANCE_CASE wording; human-reviewed every line against CLI config persistence behavior. Codex (gpt-5.6-sol) used for read-only review only (VERDICT=PASS). No AI commit trailers.

Related Issues

closes #1440

ASSURANCE_CASE.md said keys are env-only and never stored in config
files. The CLI persists api_key/auth_token to ~/.opencodereview/config.json
with mode 0600. Align the assurance case with that behavior.

Fixes alibaba#1440
@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview: Review skipped: no items were selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(assurance): ASSURANCE_CASE claims API keys are never stored in config files, but CLI persists api_key to config.json

1 participant