refactor(#1108): use OpenShell providers for Jira credentials - #1109
refactor(#1108): use OpenShell providers for Jira credentials#1109fullsend-ai-coder[bot] wants to merge 2 commits into
Conversation
Converge both triage and code agents on provider-backed Jira API access so the real JIRA_TOKEN never enters either sandbox. The jira-ro provider injects an opaque placeholder at the HTTP layer; sandboxed curl calls authenticate through the provider boundary instead of using the real secret. Triage harness: remove JIRA_TOKEN from env.sandbox and env/jira/triage.env. The provider (already attached) supplies the placeholder. Runner-side post-scripts retain the real token via env.runner for trusted mutations. Code harness: attach providers/jira-ro.yaml and the fullsend-jira-ro OpenShell profile. Remove the runner-side .issue-context.json prefetch — the sandbox reads Jira work items directly via the provider boundary. Remove JIRA_ISSUE_CONTEXT_FILE, JIRA_USER_EMAIL, and JIRA_TOKEN from env.runner (no longer needed). Add JIRA_USER_EMAIL and JIRA_BASE_URL to env.sandbox (non-secret config for API calls). Pre-script: strip credential requirements and issue-fetch logic from pre-code-jira.src.sh, keeping URL validation and pre-commit tool installation. Skill: update code-implementation to query Jira directly via curl instead of reading .issue-context.json. Tests: add harness-jira-test.sh verifying provider/profile selection and JIRA_TOKEN absence from sandbox config. Update pre-code-jira-test.sh for the simplified pre-script. Note: shellcheck could not run (not available in sandbox). pre-commit hooks could not fetch remote repos (network policy); ran equivalent checks directly. Pre-existing post-retro-test.sh failures (16) are unrelated to this change. Closes #1108
|
🤖 Finished Review · ✅ Success · Started 10:04 PM UTC · Completed 10:26 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high |
|
Risk Assessment: moderate (2/5) DetailsAnchored to prior assessment (score 2). Only LOCAL.md documentation changed since last review; Tier 1 signals unchanged — same file count (11), same protected-path count (7), same bot author, same dependency status. No articulable reason to change the score. Previous runRisk Assessment: moderate (2/5) DetailsModerate file count (10) with 7 protected-path changes (harness/, scripts/, skills/), but bot author, same-day triaged issue, clear acceptance criteria coverage, and security-focused credential boundary refactor mitigate risk. |
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 10:28 PM UTC · Completed 10:34 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.61 |
Update two stale references in LOCAL.md that still described the removed runner-side Jira prefetch pattern: - Line 165: Clarify that JIRA_USER_EMAIL and JIRA_BASE_URL now enter the code sandbox as non-secret config, while JIRA_TOKEN stays on the runner for post-script mutations. - Lines 178–181: Replace the fullsend CLI / host_files / .issue-context.json description with the new provider-backed API access pattern. Addresses #1109
🔧 Fix agent — iteration 1 (bot-triggered)Fixed two stale references in LOCAL.md: updated the env var comment (line 165) to clarify which vars enter the sandbox, and replaced the prefetch description (lines 178–181) with the new provider-backed API access pattern. Disagreed with three informational findings: protected-path process note (no code fix needed), defense-in-depth observation (intentional design tradeoff), and credential-exposure note (mitigated by profile enforcement). Fixed (2):
Disagreed (3):
Tests: passedNext steps:
|
|
🤖 Finished Review · ✅ Success · Started 10:35 PM UTC · Completed 10:54 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.55 |
Superseded by updated review
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
harness/triage.yaml(file-level): Line 111 · [low] incomplete-credential-removal
JIRA_TOKEN remains in the triage overlay's runner env block. The runner-side presence is architecturally justified: pre-triage.sh and post-triage.sh execute on the runner and require the real credential for Jira API mutations. This asymmetry with the code agent is by design per issue #1108 acceptance criteria.
| exit 1 | ||
| if [ "${FULLSEND_TRACKER:-}" = "jira" ]; then | ||
| ISSUE_KEY=$(echo "${ISSUE_URL}" | sed -E 's|.*/browse/||') | ||
| curl --fail-with-body --silent \ |
There was a problem hiding this comment.
[low] credential-exposure
The curl --user pattern places the provider's opaque token placeholder in process arguments within the sandbox. Under enforcement: enforce, the OpenShell proxy intercepts and substitutes the real credential at the HTTP layer, so the placeholder is not the actual secret.
| : "${JIRA_TOKEN:?JIRA_TOKEN must be set}" | ||
| : "${REPO_FULL_NAME:?REPO_FULL_NAME must be set}" | ||
|
|
||
| # Sanitize a value for safe use in GHA workflow commands (::error::, etc.). |
There was a problem hiding this comment.
[low] defense-in-depth
The pre-script's required-env-var guards for JIRA_ISSUE_CONTEXT_FILE, JIRA_USER_EMAIL, and JIRA_TOKEN are removed. With provider-backed delivery, a missing or misconfigured provider surfaces at runtime as an HTTP 401 rather than failing fast at pre-script time.
Summary
JIRA_TOKENnever enters either sandbox — only thejira-roprovider's opaque placeholder is available to sandboxed Jira clients..issue-context.jsonprefetch from the code agent; the sandbox now reads Jira work items directly through the provider boundary viacurl.harness-jira-test.shverifying provider/profile selection and token absence from sandbox configuration for both agents.Changes
Harness configuration:
harness/triage.yaml— removeJIRA_TOKENfromenv.sandbox(provider supplies placeholder)harness/code.yaml— attachproviders/jira-ro.yamlandprofiles/fullsend-jira-ro.yaml; removehost_filesprefetch and credential env vars fromenv.runner; addJIRA_USER_EMAILandJIRA_BASE_URLtoenv.sandboxenv/jira/triage.env— removeJIRA_TOKENexport (was expanded into sandbox viaexpand: true)Scripts:
scripts/pre-code-jira.src.sh— remove credential requirements and issue-fetch logic; retain URL validation and pre-commit tool installationscripts/pre-code-jira.sh— rebuilt viamake script-buildSkills and docs:
skills/code-implementation/SKILL.md— update Jira issue fetching to use provider-backed API access instead of.issue-context.jsondocs/code.md— updateFULLSEND_TRACKERdescription and Jira-source overlay documentationdocs/triage.md— document provider-backed credential delivery in Jira setup and migration notesTests:
scripts/harness-jira-test.sh(new) — verifies provider/profile presence,JIRA_TOKENabsence from sandbox config, and related assertions for both triage and code harnessesscripts/pre-code-jira-test.sh— updated for simplified pre-script (removed prefetch/credential tests, added tests confirming credentials are no longer required)Testing
bash scripts/harness-jira-test.sh— 17/17 passbash scripts/pre-code-jira-test.sh— 8/8 pass (source and bundled modes)make check-bundle— passhack/lint-agent-docs— passscan-secrets— passpost-retro-test.shfailures (16) are unrelatedCloses #1108
Post-script verification
agent/1108-jira-provider-credentials)c4879824d5045bfb8c64527a74e620332e18d95a..HEAD)