Skip to content

fix(reporting): redact imported secret evidence - #1423

Draft
seonghobae wants to merge 1 commit into
developfrom
fix/report-secret-ingestion-redaction-1009
Draft

seonghobae wants to merge 1 commit into
developfrom
fix/report-secret-ingestion-redaction-1009

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

상태

Draft / Proposed입니다. 보호된 develop 병합·릴리스 증거가 아니며, exact-head Checks와 현행-head 승인이 충족되기 전에는 merge하지 않습니다.

  • base: develop@2949d30718752ea5915c7713ba227e8c19d9e5bf
  • exact head: 5150cd79be921550e838b08bbec560052379e797
  • exact tree: 1369cf3670283dab819d0757843b82ff3f463eb7
  • local reviewed tree: 1369cf3670283dab819d0757843b82ff3f463eb7 (remote tree와 동일)

Root cause

normalize_finding()은 외부/가져온 finding의 전체 envelope를 신뢰하면서 snippet을 길이 제한만 했습니다. built-in scanner의 선행 redaction과 달리 report ingestion 경계에는 일관된 비밀 억제 계약이 없어서 다음 경로가 raw evidence를 직렬화할 수 있었습니다.

  • buyer/founder/agency/fix-pack report
  • SARIF result
  • control-plane persisted finding JSON
  • IssueOps compressed log

Preconditions / observable signals

재현 조건은 신뢰되지 않은 finding 또는 job log에 다음 중 하나가 포함되는 경우입니다.

  • category=secrets 또는 실제 secret disclosure semantics를 가진 rule의 opaque snippet
  • raw/credential/token/password/api-key/private-key 계열 extension field나 mapping key
  • Authorization, credential assignment, JWT, 지원 provider-token 형식
  • single/double/triple/backtick multiline 값과 escaped triple delimiter
  • 비정상 line 객체의 후행 문자열 변환
  • snippet_max_len 경계를 가로지르는 provider token

관찰 신호는 raw token/opaque credential이 report/SARIF/control-plane JSON에 그대로 남는 것입니다.

Repair

  • finding envelope 전체를 fail-closed recursive sanitizer로 정규화합니다.
  • category/rule semantics가 실제 secret disclosure이면 snippet 전체를 억제합니다.
  • nested sensitive field와 key, plural/camel/suffixed compound 이름, mapping-key collision을 처리합니다.
  • arbitrary Authorization schemes, AWS/provider/JWT, scoped sk-proj/sk-svcacct, multiline·escaped delimiter를 처리합니다.
  • line은 bounded positive integer로만 정규화합니다.
  • snippet lookahead는 탐지에만 쓰고 원래 source boundary 내부 span만 치환합니다.
  • issueops.SECRET_RE 호환 동작을 유지합니다.

Gate를 억제하거나 finding을 숨긴 것이 아니라, raw credential payload만 report-safe evidence로 변환합니다.

Regression corpus / TDD

수정 전 successive RED rounds에서 3, 20, 9, 11, 13, 4개 adversarial failure를 재현했습니다. 회귀에는 다음 downstream surface가 포함됩니다.

  • all four report types
  • SARIF
  • control-plane persistence
  • IssueOps
  • mapping-key collision
  • false-positive provider-name rules
  • truncation offset/source-boundary fuzz
  • escaped odd/even triple delimiters

최종 동일 tree 검증:

  • full suite: 1,174 passed
  • exact statement coverage suite: 157 passed
  • appguardrail_core/findings.py: 237/237
  • appguardrail_core/redaction.py: 89/89
  • appguardrail_core/issueops.py: 193/193
  • python3 -m compileall -q appguardrail_core: pass
  • git diff --check: pass
  • independent exact-head review: Critical 0 / Important 0
  • 1,000,000–2,000,000 character regex stress: no ReDoS signal
  • installed wheel smoke: pass
  • wheel SHA-256: 5f376acffaae469ea4fb807b34459054f302725a67535f348ef6491edf27bc0f

FP / FN boundary

  • Provider 이름만 포함한 비밀과 무관한 rule은 evidence를 보존합니다.
  • Authorization value와 structurally sensitive field는 opaque 값도 의도적으로 fail-closed redaction합니다.
  • raw/credential-named field 밖의 알려지지 않은 새로운 비밀 형식은 계속 format-specific pattern에 의존합니다.
  • 출력 길이 밖 lookahead text는 절대 직렬화하지 않습니다.

Follow-up

이 PR의 exact-head workflow/run/job을 직접 확인하고, 실행되지 않은 runner/admission failure는 source failure와 분리해 중앙 owner에 연결합니다. 보호 브랜치 통합 후에만 release/consumer claim을 갱신합니다.

Normalize untrusted finding envelopes through one report-safe boundary.
Redact nested fields and keys, authorization/credential/provider forms,
multiline and escaped delimiters, and source-aligned truncated snippets.
Preserve IssueOps compatibility and add downstream regression coverage
for all reports, SARIF, and control-plane persistence.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Exact-head Checks RCA — 2026-10-09

PR head 5150cd79be921550e838b08bbec560052379e797 / tree 1369cf3670283dab819d0757843b82ff3f463eb7의 PR-triggered workflow 6개를 재조회했습니다.

Workflow run Jobs terminal evidence
Tests 37889115839 113685778603, 113685778788 completed/failure; steps=null, logs_url=null
Security Process 37889115704 113685777365, 113685777574 completed/failure; steps=null, logs_url=null
Scan path context coverage 37889115651 113685777262 completed/failure; steps=null, logs_url=null
Pinned HTTPS Coverage 37889115665 113685777224 completed/failure; steps=null, logs_url=null
OpenSSF Evidence Coverage 37889115649 113685777362 completed/failure; steps=null, logs_url=null
Retention Audit Coverage 37889115682 113685777755 completed/failure; steps=null, logs_url=null

어떤 source step, test, scanner도 실행되지 않았으므로 이 결과는 코드 failure나 security verdict가 아닙니다. exact billing/admission 원인은 이 응답만으로 확정하지 않고 중앙 owner ContextualWisdomLab/.github#2356에 연결했습니다.

원인 변화 없는 blind rerun, gate 약화, Ready 전환, merge는 하지 않습니다. 동일 head에서 실행 가능한 receipt와 qualifying current-head review가 필요합니다.

This branch has not been deployed

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant