Skip to content

Remediate Reachable DLP sinks and harden CI file/path handling - #12

Draft
al1dazzi with Copilot wants to merge 7 commits into
mainfrom
copilot/rch-task-738065fdf9d1ae77-remediate-batch
Draft

al1dazzi with Copilot wants to merge 7 commits into
mainfrom
copilot/rch-task-738065fdf9d1ae77-remediate-batch

Conversation

Copilot AI commented Sep 12, 2026

Copy link
Copy Markdown

This PR addresses the selected Reachable shard: raw PII exposure from SupportExport, DB-derived content flowing into emitted summary output, and symlink-unsafe file access in the targeted CI scripts.

  • Redact DLP sinks in internal/handlers/dlp.go

    • Remove raw SSN/DOB from log output.
    • Replace the outbound analytics payload with a non-PII event shape.
    • Preserve the existing CSV response contract.
  • Bound DB-derived output in ci/reachable-cache-evidence.py

    • Sanitize and length-bound scan fields loaded from repo.db before including them in the emitted evidence payload.
    • Keep numeric fields intact while preventing raw multiline/unbounded content from propagating into downstream consumers.
  • Harden selected CI file operations against symlink escape

    • Add a small shared resolve_within helper for path containment.
    • Apply it to the selected sinks in:
      • ci/smoke-pages-summary.py
      • ci/validate-marketplace-metadata.py
      • ci/smoke-db-remediation-proof.py
    • Reject paths that escape the intended root, resolve through broken symlinks, or rely on missing parent directories.
  • Add focused regression coverage

    • Add Go tests for redacted SupportExport logging/outbound behavior while preserving legitimate CSV output.
    • Add smoke coverage for:
      • sanitized cache-evidence DB summaries
      • symlink escape rejection
      • missing-parent path rejection
      • marketplace metadata validation through safe path resolution

Example of the DLP change:

log.Printf("Processing support export fixture pii_redacted=true records=1")
payload, _ := json.Marshal(map[string]any{
    "event":                  "support_export_generated",
    "contains_synthetic_pii": true,
    "records":                1,
})

Copilot AI and others added 6 commits September 12, 2026 12:01
Co-authored-by: al1dazzi <247480224+al1dazzi@users.noreply.github.com>
Co-authored-by: al1dazzi <247480224+al1dazzi@users.noreply.github.com>
Co-authored-by: al1dazzi <247480224+al1dazzi@users.noreply.github.com>
Co-authored-by: al1dazzi <247480224+al1dazzi@users.noreply.github.com>
Co-authored-by: al1dazzi <247480224+al1dazzi@users.noreply.github.com>
Co-authored-by: al1dazzi <247480224+al1dazzi@users.noreply.github.com>
Copilot AI changed the title [WIP] Remediate selected batch of 4 units Remediate Reachable DLP sinks and harden CI file/path handling Sep 12, 2026
Copilot AI requested a review from al1dazzi September 12, 2026 12:07

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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants