Skip to content

Commit af906eb

Browse files
vmrh21claude
andcommitted
fix: apply base64 | tr -d newline fix to all auth lines (matches PR 106)
Prevents broken Authorization headers when credentials are long enough to trigger base64 line-wrapping at 76 chars. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 1b8f24f commit af906eb

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

workflows/cve-fixer/.claude/commands/cve.find.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Report: artifacts/cve-fixer/find/cve-issues-20260226-145018.md
8787

8888
```bash
8989
JIRA_BASE_URL="https://redhat.atlassian.net"
90-
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64)
90+
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64 | tr -d '\n')
9191

9292
# Diagnostic only — do NOT stop if these are "no"
9393
echo "JIRA_API_TOKEN in bash env: $([ -n "${JIRA_API_TOKEN}" ] && echo yes || echo no)"

workflows/cve-fixer/.claude/commands/cve.fix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ This issue can be closed as 'Not a Bug / ${VEX_JUSTIFICATION}' if the above evid
574574
COMMENT_JSON=$(jq -n --arg body "$COMMENT_TEXT" '{"body": $body}')
575575
576576
# Post comment via Jira API
577-
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64)
577+
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64 | tr -d '\n')
578578
curl -s -X POST \
579579
-H "Authorization: Basic ${AUTH}" \
580580
-H "Content-Type: application/json" \
@@ -1138,7 +1138,7 @@ Possible causes: transitive dependency conflict, incorrect package targeted, or
11381138
the fix requires additional changes beyond a version bump."
11391139

11401140
COMMENT_JSON=$(jq -n --arg body "$COMMENT_TEXT" '{"body": $body}')
1141-
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64)
1141+
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64 | tr -d '\n')
11421142
curl -s -X POST \
11431143
-H "Authorization: Basic ${AUTH}" \
11441144
-H "Content-Type: application/json" \

workflows/cve-fixer/.claude/commands/onboard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ used in Jira — this is validated against the Jira API during onboarding.
3838

3939
```bash
4040
JIRA_BASE_URL="https://redhat.atlassian.net"
41-
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64)
41+
AUTH=$(echo -n "${JIRA_EMAIL}:${JIRA_API_TOKEN}" | base64 | tr -d '\n')
4242
JQL="component = \"${COMPONENT_NAME}\" AND labels = SecurityTracking"
4343
ENCODED=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$JQL")
4444

0 commit comments

Comments
 (0)