fix(security): enforce bounded artifact-token parsing - #274
Conversation
- String.split 및 String.join을 제거하고 indexOf/lastIndexOf를 사용한 수동 파싱으로 교체 - 필드 추출 전 HMAC 서명을 먼저 검증하여 유효하지 않은 토큰에 대한 불필요한 객체 할당 방지 - 배열 할당 및 정규식 오버헤드 감소
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough
ChangesArtifact 토큰 검증
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java (1)
353-370: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win수동 파서의 경계값 회귀 테스트를 추가하세요.
ArtifactLinkServiceTest에서 올바른 HMAC을 가진 9개 및 11개 payload 필드와 빈 필드를 테스트하세요. 잘못된 Base64URL, 비수치 또는 범위를 벗어난 epoch-second, 잘못된 UUID의 기대 결과도 명시하세요.ArtifactTokenParserFuzzTest는 항상 10개 필드를 유효한 Base64URL로 인코딩하므로 이 경로를 모두 대체하지 않습니다. JaCoCo line/branch 100% 결과와 Jazzer 대상을 CI에서 계속 확인하세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java` around lines 353 - 370, Add boundary-regression tests in ArtifactLinkServiceTest covering valid-HMAC payloads with 9 and 11 fields, including empty fields, plus invalid Base64URL, non-numeric or out-of-range epoch seconds, and malformed UUID expectations. Exercise the manual parser loop around TOKEN_FIELD_COUNT and lastDotIndex; retain ArtifactTokenParserFuzzTest and ensure CI still verifies JaCoCo line/branch coverage and the Jazzer target.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java`:
- Around line 353-370: Add boundary-regression tests in ArtifactLinkServiceTest
covering valid-HMAC payloads with 9 and 11 fields, including empty fields, plus
invalid Base64URL, non-numeric or out-of-range epoch seconds, and malformed UUID
expectations. Exercise the manual parser loop around TOKEN_FIELD_COUNT and
lastDotIndex; retain ArtifactTokenParserFuzzTest and ensure CI still verifies
JaCoCo line/branch coverage and the Jazzer target.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1ae73271-481c-4649-befa-164af1657def
📒 Files selected for processing (1)
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java (1)
63-114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win변경된 파서의 나머지 분기에도 테스트를 추가하십시오.
현재 테스트는 필드 수, Base64URL, epoch, UUID 경계를 다룹니다.
parseAndVerify의 다음 세 분기는 아직 다루지 않습니다.
- 점(
.)이 전혀 없는 토큰:lastDotIndex == -1- 서명 불일치:
MessageDigest.isEqual가 false를 반환하는 경로- 지원하지 않는 버전:
parts[0]가VERSION과 다른 경우코딩 가이드라인은 프로덕션 Java 코드에 100% JaCoCo 라인 및 분기 커버리지를 요구합니다. 이 테스트들을 추가하면 이번 변경의 커버리지가 완결됩니다.
♻️ 추가 테스트 예시
+ `@Test` + void rejectsTokenWithoutDelimiter() { + assertMalformedToken("no-delimiter-token"); + } + + `@Test` + void rejectsTokenWithTamperedSignature() { + String payload = String.join(".", validPayloadFields); + assertMalformedToken(payload + "." + encode("wrong-signature")); + } + + `@Test` + void rejectsSignedPayloadWithUnsupportedVersion() { + String[] fields = validPayloadFields.clone(); + fields[0] = encode("v0"); + + assertMalformedToken(signedToken(fields)); + }As per coding guidelines: "Production Java code must maintain 100% JaCoCo line and branch coverage".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java` around lines 63 - 114, Extend the tests for parseAndVerify to cover the remaining branches: assert a token with no dot is rejected, create a structurally valid token with a deliberately mismatched signature and assert rejection, and create a signed token whose first field differs from VERSION and assert rejection. Keep the existing malformed-token assertion style and helpers such as signedToken and assertMalformedToken.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java`:
- Around line 76-82: Update the parser exercised by
ArtifactTokenManualParserBoundaryTest so an empty tokenId field is rejected
during parsing and never stored in ArtifactTokenClaims. Preserve the existing
malformed-token assertion path, ensuring the request fails as 401 Unauthorized
rather than reaching findByTokenId("") and returning 403.
---
Nitpick comments:
In
`@src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java`:
- Around line 63-114: Extend the tests for parseAndVerify to cover the remaining
branches: assert a token with no dot is rejected, create a structurally valid
token with a deliberately mismatched signature and assert rejection, and create
a signed token whose first field differs from VERSION and assert rejection. Keep
the existing malformed-token assertion style and helpers such as signedToken and
assertMalformedToken.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4c5f6a1d-ef20-4d0f-a473-c1058af9d2a1
📒 Files selected for processing (1)
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java
|
CodeRabbit's boundary-regression finding was valid. It exposed a fail-closed distinction: an HMAC-valid token with an empty required token-id segment reached the ledger and returned |
|
@coderabbitai review @opencode-agent @cwl-noema-review Please independently review exact current head |
|
The additional CodeRabbit nitpick is duplicate rather than an untested production branch. Existing |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== checked-out commit =='
git rev-parse HEAD
git status --short
git show -s --format='%H%n%P%n%s' HEAD
echo '== requested commit availability and diff summary =='
git cat-file -e ce93485cf9ce859e594303774b6e87278ef9bcca^{commit}
git diff --stat ce93485cf9ce859e594303774b6e87278ef9bcca^ ce93485cf9ce859e594303774b6e87278ef9bcca
git diff --find-renames --unified=80 ce93485cf9ce859e594303774b6e87278ef9bcca^ ce93485cf9ce859e594303774b6e87278ef9bcca -- src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java
echo '== source and boundary-test outlines =='
ast-grep outline src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java --items all
ast-grep outline src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java --items all
echo '== parser and related security references =='
rg -n -C 6 --glob '*.java' \
'parseAndVerify|MessageDigest\.isEqual|Base64|getDecoder|UUID\.fromString|parseLong|ledger|FORBIDDEN|UNAUTHORIZED|Jazzer|Fuzz' \
src/main src/test .github 2>/dev/null || true
echo '== fuzz files =='
fd -HI -t f . | rg -i '(jazzer|fuzz|fuzzer)'
echo '== GitHub PR and requested workflow runs =='
gh pr view 274 --repo ContextualWisdomLab/clearfolio --json number,state,isDraft,headRefOid,reviewDecision,statusCheckRollup,reviews
for run in 31051666714 31051900018 31051901808 31051899990; do
echo "-- run $run --"
gh run view "$run" --repo ContextualWisdomLab/clearfolio --json databaseId,headSha,status,conclusion,name,event,workflowName,url,jobs
doneLength of output: 206790 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== boundary test, complete =='
cat -n src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java
echo '== artifact parser fuzz target =='
cat -n src/test/java/com/clearfolio/viewer/fuzz/ArtifactTokenParserFuzzTest.java
echo '== relevant workflows =='
for file in .github/workflows/fuzz.yml .github/workflows/ci.yml; do
if [ -f "$file" ]; then
echo "-- $file --"
cat -n "$file"
fi
done
fd -HI -t f -e yml -e yaml .github/workflows -x sh -c '
if grep -qiE "benchmark|allocation|changelog|fuzz|jazzer" "$1"; then
echo "-- $1 --"
grep -inE "benchmark|allocation|changelog|fuzz|jazzer" "$1"
fi
' sh {}
echo '== changelog and benchmark references =='
fd -HI -t f -i 'changelog*' -i '*benchmark*' . || true
rg -n -i -C 2 'artifact token|artifactlink|manual parser|split\("\\\\\."\)|benchmark|allocation' \
CHANGELOG.md docs README.md pom.xml .github 2>/dev/null || true
echo '== direct Actions run records =='
for run in 31051666714 31051900018 31051901808 31051899990 31051899956 31051898608; do
echo "-- run $run --"
gh api "repos/ContextualWisdomLab/clearfolio/actions/runs/$run" \
--jq '{id,head_sha,status,conclusion,name,event,html_url,created_at,updated_at}'
done
echo '== RED Maven test failure evidence =='
gh run view 31051666714 --repo ContextualWisdomLab/clearfolio --job 92460004269 --log-failed 2>&1 \
| rg -n -i -C 3 'expected|actual|empty|token|failure|ArtifactTokenManualParserBoundaryTest' || true
echo '== current PR checks and review state =='
gh pr view 274 --repo ContextualWisdomLab/clearfolio \
--json isDraft,headRefOid,reviewDecision,statusCheckRollup \
--jq '{isDraft,headRefOid,reviewDecision,checks:[.statusCheckRollup[]|{name,status,conclusion,workflowName,detailsUrl}]}'Length of output: 20133 🏁 Script executed: #!/bin/bash
set -u
echo '== changelog and benchmark files =='
fd -HI -t f . | rg -i '(^|/)(changelog[^/]*|[^/]*benchmark[^/]*)$' || true
echo '== workflow references =='
fd -HI -t f . .github/workflows | while IFS= read -r file; do
if grep -qiE 'benchmark|allocation|changelog|fuzz|jazzer' "$file"; then
echo "-- $file --"
grep -inE 'benchmark|allocation|changelog|fuzz|jazzer' "$file" || true
fi
done
echo '== project references =='
rg -n -i -C 2 'artifact token|artifactlink|manual parser|benchmark|allocation|changelog' \
README.md docs pom.xml .github 2>/dev/null || true
echo '== direct Actions records =='
for run in 31051666714 31051900018 31051901808 31051899990 31051899956 31051898608; do
echo "-- run $run --"
gh api "repos/ContextualWisdomLab/clearfolio/actions/runs/$run" \
--jq '{id,head_sha,status,conclusion,name,event,html_url,created_at,updated_at}' \
|| echo "UNAVAILABLE: $run"
done
echo '== RED test failure lines =='
gh run view 31051666714 --repo ContextualWisdomLab/clearfolio --job 92460004269 --log-failed 2>&1 \
| rg -n -i -C 4 'expected|actual|empty|required field|ArtifactTokenManualParserBoundaryTest|FAILURE' \
|| true
echo '== current exact-head checks =='
gh pr view 274 --repo ContextualWisdomLab/clearfolio \
--json isDraft,headRefOid,reviewDecision,statusCheckRollup \
--jq '{isDraft,headRefOid,reviewDecision,checks:[.statusCheckRollup[]|select(.name|test("Maven test|fuzz \\(ArtifactTokenParserFuzzTest\\)|Semgrep|osv-scan|trivy-fs|scorecard|strix"))|{name,status,conclusion,workflowName,detailsUrl}]}' \
|| trueLength of output: 74984
The empty-segment regression is fixed. The RED evidence is valid. CI run Actionable finding: The PR is still Draft. The Strix workflow
|
Thank you for the valid finding. I have addressed the fail-closed distinction by enforcing strict bounds checking in the manual |
- Add bounds checking `isEmpty()` for each segment during token parsing - Rejects empty payload segments to prevent returning 403 Forbidden instead of 401 Unauthorized
|
@coderabbitai review Please review exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
requested='e15754503470c03ad11cbe8e718dfae41d25b259'
repo='ContextualWisdomLab/clearfolio'
echo '== Repository state and requested commit =='
echo "checked_out=$(git rev-parse HEAD)"
git status --short
git cat-file -e "${requested}^{commit}"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$requested"
echo '== PR current head and review/check state =='
gh pr view 274 --repo "$repo" \
--json number,state,isDraft,headRefOid,reviewDecision,statusCheckRollup \
--jq '{number,state,isDraft,headRefOid,reviewDecision,checks:[.statusCheckRollup[]|{name,status,conclusion,workflowName,detailsUrl}]}'
echo '== Current-head changes from first parent =='
git diff --stat "${requested}^" "$requested"
git diff --find-renames --unified=100 "${requested}^" "$requested" -- \
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactLinkServiceTest.java
echo '== Relevant file discovery =='
fd -HI -t f . | rg '(ArtifactLinkService|ArtifactToken.*(Test|Fuzz)|fuzz\.ya?ml|ci\.ya?ml)$' || true
echo '== Source and test outlines =='
for file in \
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactLinkServiceTest.java \
src/test/java/com/clearfolio/viewer/fuzz/ArtifactTokenParserFuzzTest.java
do
if [ -f "$file" ]; then
echo "-- outline: $file --"
ast-grep outline "$file" --items all
fi
done
echo '== Parser, status mapping, and boundary-test references =='
rg -n -C 8 --glob '*.java' \
'parseAndVerify|verifyReadToken|MessageDigest\.isEqual|lastIndexOf|indexOf|split\(|Base64|UUID\.fromString|parseLong|UNAUTHORIZED|FORBIDDEN|unsupported|empty|required|malformed|ArtifactTokenParserFuzzTest' \
src/main src/test
echo '== Complete current files under review =='
for file in \
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactLinkServiceTest.java \
src/test/java/com/clearfolio/viewer/fuzz/ArtifactTokenParserFuzzTest.java
do
if [ -f "$file" ]; then
echo "-- $file --"
cat -n "$file"
fi
done
echo '== Workflow and fuzz configuration =='
for file in .github/workflows/*.yml .github/workflows/*.yaml; do
[ -f "$file" ] || continue
if grep -qiE 'fuzz|jazzer|ArtifactTokenParserFuzzTest' "$file"; then
echo "-- $file --"
cat -n "$file"
fi
doneLength of output: 175304 🏁 Script executed: #!/bin/bash
set -euo pipefail
requested='e15754503470c03ad11cbe8e718dfae41d25b259'
repo='ContextualWisdomLab/clearfolio'
echo '== Exact-head identity =='
printf 'checked_out='
git rev-parse HEAD
git show -s --format='requested=%H%nparent=%P%nsubject=%s' "$requested"
gh pr view 274 --repo "$repo" --json headRefOid,isDraft,reviewDecision \
--jq '{headRefOid,isDraft,reviewDecision}'
echo '== Exact-head changed files and patch =='
git diff-tree --no-commit-id --name-status -r "$requested"
git diff --unified=25 "${requested}^" "$requested" -- \
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactLinkServiceTest.java
echo '== Requested deterministic test definitions =='
rg -n --glob '*.java' \
'void (rejectsSignedPayloadWithOnlyNineFields|rejectsSignedPayloadWithElevenFields|rejectsSignedPayloadWithAnEmptyRequiredField|rejectsSignedPayloadWithMalformedBase64Url|rejectsSignedPayloadWithNonNumericEpochSecond|rejectsSignedPayloadWithOutOfRangeEpochSecond|rejectsSignedPayloadWithMalformedDocumentIdentifier|rejectsSignedPayloadWithUnsupportedVersion|verifyReadTokenRejectsUnsupportedVersion)\s*\(' \
src/test/java/com/clearfolio/viewer/artifact
echo '== Current-head status checks =='
gh pr checks 274 --repo "$repo" --json name,state,workflow,link \
--jq '.[] | {name,state,workflow,link}' || true
echo '== All actions runs on the requested head =='
gh run list --repo "$repo" --commit "$requested" --limit 50 \
--json databaseId,name,workflowName,status,conclusion,url,createdAt,updatedAt \
--jq '.[] | {databaseId,name,workflowName,status,conclusion,url,createdAt,updatedAt}' || trueLength of output: 19331
I found no actionable issue in the requested scope.
Current-head CI, Security Scan, SAST Semgrep, CodeQL, and all fuzz targets, including The PR remains Draft and requires review. Strix Security Scan run ✅ Action performedReview finished.
|
- Reverted cryptographic signature validation to run *after* token structure parsing. - Restored original `secretBytes` method to prevent breaking change to token derivation.
|
@coderabbitai review @opencode-agent @cwl-noema-review Please independently review exact current head |
Acknowledged. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/clearfolio'
head='96c624297174b5cb0e39f6dadbad05ca6091d81a'
echo '== exact commit and PR state =='
printf 'checked_out='; git rev-parse HEAD
git cat-file -e "${head}^{commit}"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
gh pr view 274 --repo "$repo" \
--json number,state,isDraft,headRefOid,reviewDecision,statusCheckRollup \
--jq '{number,state,isDraft,headRefOid,reviewDecision,checks:[.statusCheckRollup[]|{name,status,conclusion,workflowName,detailsUrl}]}'
echo '== changes in requested commit =='
git diff-tree --no-commit-id --name-status -r "$head"
git diff --unified=40 "${head}^" "$head" -- \
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactLinkServiceTest.java
echo '== relevant files =='
fd -HI -t f . | rg '(ArtifactLinkService|ArtifactToken.*(Test|Fuzz)|fuzz\.ya?ml|ci\.ya?ml|CHANGELOG|README|benchmark)' || true
echo '== source and test outlines =='
for file in \
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactTokenManualParserBoundaryTest.java \
src/test/java/com/clearfolio/viewer/artifact/ArtifactLinkServiceTest.java \
src/test/java/com/clearfolio/viewer/fuzz/ArtifactTokenParserFuzzTest.java
do
if [ -f "$file" ]; then
echo "-- $file --"
ast-grep outline "$file" --items all
fi
done
echo '== implementation and deterministic-test references =='
rg -n -C 7 --glob '*.java' \
'parseAndVerify|verifyReadToken|MessageDigest\.isEqual|lastIndexOf|indexOf|Base64|UUID\.fromString|parseLong|UNAUTHORIZED|FORBIDDEN|rejectsSignedPayload|verifyReadTokenRejectsUnsupportedVersion|ArtifactTokenParserFuzzTest' \
src/main src/test
echo '== exact-head workflow runs =='
gh run list --repo "$repo" --commit "$head" --limit 100 \
--json databaseId,name,workflowName,status,conclusion,url,createdAt,updatedAt \
--jq '.[] | {databaseId,name,workflowName,status,conclusion,url,createdAt,updatedAt}'Length of output: 181700 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/clearfolio'
head='96c624297174b5cb0e39f6dadbad05ca6091d81a'
echo '== confirm current PR head =='
gh pr view 274 --repo "$repo" --json headRefOid,isDraft,reviewDecision \
--jq '{headRefOid,isDraft,reviewDecision}'
echo '== required exact-head workflow status =='
gh run list --repo "$repo" --commit "$head" --limit 100 \
--json databaseId,name,workflowName,status,conclusion,url,updatedAt \
--jq '.[] | select(
(.name == "CI") or
(.name == "Security Scan") or
(.name == "SAST Semgrep") or
(.name == "fuzz") or
(.name | startswith("Strix Security Scan"))
) | {databaseId,name,workflowName,status,conclusion,url,updatedAt}'
echo '== performance claims and benchmark evidence =='
rg -n -i -C 3 \
'성능 최적화|allocation|allocat|throughput|benchmark|regex.*overhead|overhead.*regex|unnecessary.*array' \
src/main/java/com/clearfolio/viewer/artifact/ArtifactLinkService.java \
CHANGELOG.md README.md docs .github pom.xml 2>/dev/null || true
echo '== benchmark-related tracked files =='
fd -HI -t f . | rg -i '(^|/)[^/]*(benchmark|jmh|perf|performance)[^/]*($|/)' || trueLength of output: 4230 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/clearfolio'
head='96c624297174b5cb0e39f6dadbad05ca6091d81a'
echo '== current head =='
gh pr view 274 --repo "$repo" --json headRefOid,isDraft,reviewDecision \
--jq '{headRefOid,isDraft,reviewDecision}'
echo '== required exact-head runs =='
for run in 31058784201 31058784263 31058784481 31058784233; do
gh run view "$run" --repo "$repo" \
--json databaseId,headSha,name,status,conclusion,url,updatedAt \
--jq '{databaseId,headSha,name,status,conclusion,url,updatedAt}'
done
echo '== exact-head check rollup for CI, security, SAST, and fuzz =='
gh pr view 274 --repo "$repo" --json statusCheckRollup \
--jq '[.statusCheckRollup[] |
select(
.name == "Maven test" or
.name == "Semgrep (multi-language SAST)" or
.name == "osv-scan" or
.name == "trivy-fs" or
.name == "dependency-review" or
.name == "scorecard" or
(.name | startswith("fuzz ("))
) |
{name,status,conclusion,workflowName,detailsUrl}
]'Length of output: 1875 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/clearfolio'
head='96c624297174b5cb0e39f6dadbad05ca6091d81a'
echo '== current head =='
gh pr view 274 --repo "$repo" --json headRefOid,isDraft,reviewDecision \
--jq '{headRefOid,isDraft,reviewDecision}'
echo '== direct exact-head workflow records =='
for run in 31058784201 31058784263 31058784481 31058784233; do
echo "-- $run --"
gh api "repos/${repo}/actions/runs/${run}" \
--jq '{id,head_sha,name,status,conclusion,html_url,updated_at}'
done
echo '== fuzz job status =='
gh api "repos/${repo}/actions/runs/31058784233/jobs?per_page=100" \
--jq '.jobs[] | {name,status,conclusion,html_url,started_at,completed_at}'
echo '== exact-head pull request check rollup =='
gh pr view 274 --repo "$repo" --json statusCheckRollup \
--jq '[.statusCheckRollup[] |
select(
.name == "Maven test" or
.name == "Semgrep (multi-language SAST)" or
.name == "osv-scan" or
.name == "trivy-fs" or
.name == "dependency-review" or
.name == "scorecard" or
(.name | startswith("fuzz ("))
) |
{name,status,conclusion,workflowName,detailsUrl}
]'Length of output: 3642
CI I found one actionable issue. Unsupported performance claim: I found no other actionable issue in the requested scope.
The PR remains Draft and requires review. You are interacting with an AI system. |
- Reverted cryptographic signature validation to run *after* token structure parsing. - Restored original `secretBytes` method to prevent breaking change to token derivation.
Scope
Replace regex-backed artifact-token splitting with a bounded ten-field parser, verify the HMAC before decoding claims, and reject malformed signed payload structure before authorization or ledger lookup. This PR intentionally makes no allocation or throughput claim without reproducible benchmark evidence.
Test-first security correction
CodeRabbit correctly identified missing signed malformed-payload regressions. Test-first commit
892ba8274e7dc9fdafa1cf2e82a2ba36499dd9bfadded deterministic coverage for nine and eleven payload fields, an empty required field, malformed Base64URL, nonnumeric and out-of-range epoch seconds, and a malformed UUID. CI run31051666714failed RED because an empty token-id segment returned403 FORBIDDENafter ledger lookup rather than401 UNAUTHORIZEDas malformed authentication evidence.Production commit
ce93485cf9ce859e594303774b6e87278ef9bccarejects every empty payload segment during structural parsing, before decoded claims can reach authorization state.Bot commits subsequently removed the dedicated boundary-regression class twice while changing parser implementation details. Exact current head
96c624297174b5cb0e39f6dadbad05ca6091d81arestores the eight deterministic signed malformed-payload regressions after the latest removal atd01eb10e6d66fc0a1d23589618060e5832f366fa. ExistingArtifactLinkServiceTestcoverage already exercises delimiter-free input and signature mismatch, so those duplicate paths are not repeated in the boundary class.Exact-head evidence
Exact current head:
96c624297174b5cb0e39f6dadbad05ca6091d81a.31058784201: success.92481970070: success.92481970143: success.31058784263: success.31058784481: success.31058784233: success.The predecessor head
d01eb10e6d66fc0a1d23589618060e5832f366faalso passed technical checks, but its evidence is not used for the current head. The branch-local CI still uses the predecessormvn testcontract; it does not replace parent #270's strongermvn verify, complete Surefire/Failsafe report, zero-missed JaCoCo, and warning-free Javadoc gates.Stack and acceptance requirements
Keep this PR draft. Authoritative parent #270 must integrate first because this branch is based on protected
mainand remains behind the parent. Rebuild this bounded parser slice on the resulting protectedmain, preserving the parent privacy, Netty, SBOM, attribution, exact-head, zero-coverage-miss, warning-free Javadoc, and fail-closed Maven report-evidence contracts.Before merge, require:
verify, zero missed production lines and branches, warning-free public Javadocs, CI, Security Scan, SAST, and every required fuzz job after stack reconciliation;CHANGELOG.mdreconciliation without duplicating existingUnreleasedsections;Queued, pending, cancelled, skipped-required, stale-head, predecessor-head, local-only, or synthetic-only evidence is not passing. Do not bypass protections, weaken tests, or publish a release from this draft.