-
Notifications
You must be signed in to change notification settings - Fork 0
๐ก๏ธ Sentinel: [CRITICAL/HIGH] Fix PII exposure in policy override logs #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5261356
security: rebuild audit pseudonymization on current main
seonghobae 28966e6
test(security): require strong policy override keys
seonghobae 2e9c4a2
fix(security): reject weak policy override keys
seonghobae ac70dd7
docs(security): document policy override key strength
seonghobae 27106a5
fix: trigger CI due to strix timeout
seonghobae b3ad882
chore: remove stray CI trigger script
seonghobae 0e7770b
test: cover disabled policy signing startup path
seonghobae a86ab46
docs: consolidate unreleased changelog entries
seonghobae eb34323
build: enforce zero missed production lines and branches
seonghobae 164aecf
ci: verify exact PR head with coverage gates
seonghobae 294b30b
ci: fuzz the exact pull request head
seonghobae febb3fd
docs: record exact-head and coverage gates
seonghobae 9cf1ff8
test: add shared security provider fixture
seonghobae 3214bc0
test: cover null policy secret normalization
seonghobae 62dac96
test: cover tenant delete fail-closed branches
seonghobae 0416068
test: cover validation security edge cases
seonghobae 6b61330
test: cover conversion filename boundary
seonghobae 70f3399
test: cover artifact deletion failure
seonghobae d73571b
test: cover repository delete edge cases
seonghobae 36254ee
test: cover exception log sanitization
seonghobae a1533de
test: cover download filename and digest edges
seonghobae 31c4b4d
fix: redact rejected parameter values
seonghobae c0c0c45
docs: record rejected-value redaction
seonghobae a308f0f
test: cover every override header separator
seonghobae 39dc005
refactor: trust normalized policy secret contract
seonghobae 6e311ed
refactor: remove unreachable blank filename branch
seonghobae 8ca8958
fix(ci): isolate exact-head evidence finalization runs
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,173 @@ | ||
| name: One-shot Netty SBOM finalize | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - .github/workflows/one-shot-netty-sbom-finalize.yml | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: one-shot-netty-sbom-finalize-artifact-v2-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| finalize-evidence: | ||
| if: >- | ||
| github.repository == 'ContextualWisdomLab/clearfolio' | ||
| && github.actor == 'seonghobae' | ||
| && github.event.pull_request.head.repo.full_name == github.repository | ||
| && github.event.pull_request.head.ref == 'fix/pii-logging-16240128950440010639' | ||
| name: Ingest verified evidence and self-remove | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| permissions: | ||
| actions: read | ||
| contents: write | ||
| steps: | ||
| - name: Checkout exact pull request head | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Verify immutable trigger and live branch identity | ||
| env: | ||
| EXPECTED_SHA: ${{ github.event.pull_request.head.sha }} | ||
| HEAD_BRANCH: ${{ github.event.pull_request.head.ref }} | ||
| run: | | ||
| set -euo pipefail | ||
| test "$(git rev-parse HEAD)" = "$EXPECTED_SHA" | ||
| live_sha="$(git ls-remote origin "refs/heads/${HEAD_BRANCH}" | awk '{print $1}')" | ||
| test "$live_sha" = "$EXPECTED_SHA" | ||
|
|
||
| - name: Ingest the immutable successful read-only artifact | ||
| env: | ||
| ARTIFACT_ID: "8929593015" | ||
| EXPECTED_ARCHIVE_SHA256: 07a0325e08157f00dda28c58ed4e41af51863cccb2ceea2c4e378ead77dc337f | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| archive="$RUNNER_TEMP/netty-sbom-refresh.zip" | ||
| extracted="$RUNNER_TEMP/netty-sbom-refresh" | ||
| curl --fail --silent --show-error --location \ | ||
| --proto '=https' --tlsv1.2 \ | ||
| -H "Authorization: Bearer ${GH_TOKEN}" \ | ||
| -H "Accept: application/vnd.github+json" \ | ||
| -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
| -o "$archive" \ | ||
| "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/actions/artifacts/${ARTIFACT_ID}/zip" | ||
| printf '%s %s\n' "$EXPECTED_ARCHIVE_SHA256" "$archive" | sha256sum -c - | ||
| mkdir -p "$extracted" | ||
| unzip -q "$archive" -d "$extracted" | ||
| test "$(find "$extracted" -mindepth 1 -maxdepth 1 -type f | wc -l)" -eq 3 | ||
| test -s "$extracted/generation-manifest.json" | ||
| test -s "$extracted/sbom-cyclonedx.json" | ||
| test -s "$extracted/third-party-attribution.md" | ||
| cp "$extracted/sbom-cyclonedx.json" \ | ||
| docs/qa/evidence/2026-07-02-krw2b-sale-readiness/sbom-cyclonedx.json | ||
| cp "$extracted/third-party-attribution.md" \ | ||
| docs/legal/2026-07-03-third-party-attribution.md | ||
|
|
||
| - name: Use preinstalled Temurin JDK 21 | ||
| run: | | ||
| echo "JAVA_HOME=$JAVA_HOME_21_X64" >> "$GITHUB_ENV" | ||
| echo "$JAVA_HOME_21_X64/bin" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Verify complete generated graph and attribution | ||
| env: | ||
| EXPECTED_SBOM_SHA256: e138a9263edb40c613d5f159acba8fa89ee848a7cef4b6619e095c48451b095c | ||
| EXPECTED_ATTRIBUTION_SHA256: e19a3767a545bd059e50003882d8ff2f8a3ff4d3b8fd28d3f305eead61261da9 | ||
| run: | | ||
| set -euo pipefail | ||
| python3 - <<'PY' | ||
| import hashlib | ||
| import json | ||
| import os | ||
| from pathlib import Path | ||
|
|
||
| sbom_path = Path( | ||
| "docs/qa/evidence/2026-07-02-krw2b-sale-readiness/sbom-cyclonedx.json" | ||
| ) | ||
| attribution_path = Path( | ||
| "docs/legal/2026-07-03-third-party-attribution.md" | ||
| ) | ||
| sbom_bytes = sbom_path.read_bytes() | ||
| attribution_bytes = attribution_path.read_bytes() | ||
| sbom = json.loads(sbom_bytes) | ||
| components = sbom.get("components", []) | ||
| if len(components) != 61: | ||
| raise SystemExit(f"expected 61 components, observed {len(components)}") | ||
| netty = [item for item in components if item.get("group") == "io.netty"] | ||
| if len(netty) != 17: | ||
| raise SystemExit(f"expected 17 Netty components, observed {len(netty)}") | ||
| if {str(item.get("version", "")) for item in netty} != {"4.1.136.Final"}: | ||
| raise SystemExit("Netty versions were not coherent") | ||
| component_refs = {str(item.get("bom-ref", "")) for item in netty} | ||
| dependency_refs = set() | ||
| for dependency in sbom.get("dependencies", []): | ||
| ref = str(dependency.get("ref", "")) | ||
| if "io.netty/" in ref: | ||
| dependency_refs.add(ref) | ||
| dependency_refs.update( | ||
| str(item) | ||
| for item in dependency.get("dependsOn", []) | ||
| if "io.netty/" in str(item) | ||
| ) | ||
| if dependency_refs != component_refs: | ||
| raise SystemExit("Netty dependency references do not match component refs") | ||
| for item in netty: | ||
| expected = "@4.1.136.Final" | ||
| if expected not in str(item.get("bom-ref", "")): | ||
| raise SystemExit("Netty bom-ref version mismatch") | ||
| if expected not in str(item.get("purl", "")): | ||
| raise SystemExit("Netty purl version mismatch") | ||
| if b"4.1.135.Final" in sbom_bytes or b"4.1.135.Final" in attribution_bytes: | ||
| raise SystemExit("stale Netty evidence remains") | ||
| if hashlib.sha256(sbom_bytes).hexdigest() != os.environ["EXPECTED_SBOM_SHA256"]: | ||
| raise SystemExit("SBOM bytes differ from the successful read-only artifact") | ||
| if hashlib.sha256(attribution_bytes).hexdigest() != os.environ["EXPECTED_ATTRIBUTION_SHA256"]: | ||
| raise SystemExit("attribution bytes differ from the successful read-only artifact") | ||
| PY | ||
| python3 scripts/test_render_third_party_attribution.py | ||
| python -m pytest -q scripts | ||
| mvn -B --no-transfer-progress verify | ||
| mvn -B --no-transfer-progress dependency:tree -Dincludes=io.netty | ||
|
|
||
| - name: Commit only generated evidence and helper removal | ||
| env: | ||
| EXPECTED_SHA: ${{ github.event.pull_request.head.sha }} | ||
| HEAD_BRANCH: ${{ github.event.pull_request.head.ref }} | ||
| PUSH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| test "$(git rev-parse HEAD)" = "$EXPECTED_SHA" | ||
| live_sha="$(git ls-remote origin "refs/heads/${HEAD_BRANCH}" | awk '{print $1}')" | ||
| test "$live_sha" = "$EXPECTED_SHA" | ||
| rm .github/workflows/one-shot-netty-sbom-finalize.yml | ||
| git add \ | ||
| docs/qa/evidence/2026-07-02-krw2b-sale-readiness/sbom-cyclonedx.json \ | ||
| docs/legal/2026-07-03-third-party-attribution.md \ | ||
| .github/workflows/one-shot-netty-sbom-finalize.yml | ||
| git diff --cached --check | ||
| git diff --cached --quiet && { | ||
| echo "::error::Expected generated evidence and helper cleanup changes." | ||
| exit 1 | ||
| } | ||
| changed_paths="$(git diff --cached --name-only)" | ||
| expected_paths="$(printf '%s\n' \ | ||
| .github/workflows/one-shot-netty-sbom-finalize.yml \ | ||
| docs/legal/2026-07-03-third-party-attribution.md \ | ||
| docs/qa/evidence/2026-07-02-krw2b-sale-readiness/sbom-cyclonedx.json)" | ||
| test "$changed_paths" = "$expected_paths" | ||
| git config user.name 'github-actions[bot]' | ||
| git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
| git commit -m 'docs(evidence): ingest verified Netty 4.1.136 evidence' | ||
| auth_header="$(printf 'x-access-token:%s' "$PUSH_TOKEN" | base64 | tr -d '\n')" | ||
| echo "::add-mask::$auth_header" | ||
| git -c http.https://github.com/.extraheader="AUTHORIZATION: basic $auth_header" \ | ||
| push origin "HEAD:${HEAD_BRANCH}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.