Repository navigation
ci(jira): add context verification workflow - #2158
Aliciapet11 wants to merge 2 commits into
Conversation
Signed-off-by: apetruni <apetruni@redhat.com>
PR Summary by QodoAdd manual Jira context verification workflow
AI Description
Merge Risk
|
|
🤖 Finished Review · ✅ Success · Started 2:14 PM UTC · Completed 2:24 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.70 |
Code Review by Qodo
1. Jira tickets never reach the agent
|
| permissions: | ||
| contents: read | ||
| id-token: write |
There was a problem hiding this comment.
6. Cloud login rights go undocumented 📜 Skill insight ⛨ Security
The job-level permissions block grants id-token: write without a justification in the PR description or a linked issue. When Authenticate to GCP uses that grant for Workload Identity Federation and the run step receives GCP project and region settings, reviewers have only a description of read-only Jira and GitHub access to assess the expanded permission.
Agent Prompt
## Issue description
The job in `.github/workflows/jira-context-verification.yml` grants `id-token: write` for a GCP Workload Identity Federation step, but the PR description covers only read-only Jira and GitHub access. Reviewers therefore cannot confirm why the expanded permission is needed for the code agent run.
## Fix Focus Areas
- .github/workflows/jira-context-verification.yml[18-20]
- .github/workflows/jira-context-verification.yml[123-127]
## Recommended Fix
Confirm whether the `google-github-actions/auth` step requires OIDC and whether a narrower alternative exists. If it does require OIDC, explain in the PR description that `id-token: write` enables GCP Workload Identity Federation for the code agent run, state that it is the only write-scoped permission, and link an authorizing issue if one exists. Keep the grant at job level so it does not apply to other jobs. If the step can run without OIDC, remove the grant.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - name: Authenticate to GCP | ||
| uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 | ||
| with: | ||
| workload_identity_provider: ${{ secrets.E2E_GCP_WIF_PROVIDER }} | ||
| service_account: ${{ secrets.E2E_GCP_SERVICE_ACCOUNT }} |
There was a problem hiding this comment.
1. Agent runs fail to authenticate to vertex 🐞 Bug ≡ Correctness
Authenticate to GCP creates a Workload Identity Federation credential configuration, but the workflow invokes fullsend run code without preparing that configuration for the sandbox. When the agent makes a Vertex request, the sandbox cannot reach the GitHub OIDC endpoint referenced by the unmodified credential file, affecting all four matrix jobs.
Agent Prompt
## Issue description
The WIF credential file produced by GCP authentication cannot be used from the agent sandbox without the repository's credential-preparation step.
## Fix Focus Areas
- .github/workflows/jira-context-verification.yml[123-150]
## Recommended Fix
After authentication, run `scripts/prepare-sandbox-credentials.sh` as the functional-tests workflow does, preserving the original host credential path if host-side operations need it. Ensure the prepared credential and token file are available to the code harness before invoking `fullsend run code`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| GH_TOKEN: ${{ github.token }} | ||
| REPO_FULL_NAME: ${{ matrix.target-repo }} | ||
| TARGET_REPO_DIR: ${{ github.workspace }}/target-repo |
There was a problem hiding this comment.
2. Target hooks can copy runner credentials 🐞 Bug ⛨ Security
fullsend run code receives GH_TOKEN in its environment after GCP authentication, while the code harness's host-side validation runs hooks configured by the checked-out target repository. If an agent run produces changed files, a target-controlled pre-commit hook can execute with runner credentials and write their contents into the directory that this workflow uploads unconditionally.
Agent Prompt
## Issue description
Target-repository pre-commit hooks can run during host-side agent validation with access to the workflow's credential-bearing environment and output directory.
## Fix Focus Areas
- .github/workflows/jira-context-verification.yml[123-163]
- scripts/validate-code-output.sh[1395-1450]
## Recommended Fix
For this verification run, prevent target-controlled hooks from executing on the credential-bearing runner. Run validation in an isolated environment without runner credentials, or disable that gate for this read-only context check; keep uploaded artifacts outside the reach of untrusted processes and scrub them before publication.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| repository: fullsend-ai/fullsend | ||
| ref: main | ||
| path: .fullsend-source |
There was a problem hiding this comment.
7. Upstream changes can expose jira tokens 🐞 Bug ⛨ Security
ref: main builds the agent CLI from a mutable external checkout and the workflow later runs that binary with FULLSEND_JIRA_TOKEN in its environment. A change to upstream main between dispatches can therefore change the credential-bearing executable without a change to this repository or review of the new code.
Agent Prompt
## Issue description
The workflow builds and runs a mutable upstream revision with access to the Jira token, allowing its behavior to change between dispatches without a workflow change.
## Fix Focus Areas
- .github/workflows/jira-context-verification.yml[51-69]
## Recommended Fix
Replace `ref: main` with a reviewed full commit SHA. Update that pin through an explicit review process when a newer CLI is required.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| fullsend run code \ | ||
| --fullsend-dir "$GITHUB_WORKSPACE" \ | ||
| --target-repo "$GITHUB_WORKSPACE/target-repo" \ | ||
| --output-dir "$output_dir" \ | ||
| --no-post-script |
There was a problem hiding this comment.
3. Jira tickets never reach the agent 🔗 Cross-repo conflict ≡ Correctness
The workflow sets FULLSEND_TRACKER=jira but invokes fullsend run code without a normalized Jira event, which is what Fullsend uses to select the Jira harness overlay. For all four tickets, Fullsend instead selects the GitHub path, so the Jira pre-script and provider-backed Jira context fetches are not used.
Agent Prompt
## Issue description
Fullsend selects Jira behavior from a normalized event, not `FULLSEND_TRACKER`.
## Fix Focus Areas
- .github/workflows/jira-context-verification.yml[129-154]
## Recommended Fix
Create a valid normalized Jira event for each matrix ticket and pass it to `fullsend run code` with `--event-file`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| output_dir="${RUNNER_TEMP}/fullsend-output-${{ matrix.issue-type }}" | ||
| mkdir -p "$output_dir" | ||
| fullsend run code \ | ||
| --fullsend-dir "$GITHUB_WORKSPACE" \ |
There was a problem hiding this comment.
4. Jira events lack tracker configuration 🔗 Cross-repo conflict ≡ Correctness
The workflow points --fullsend-dir at the repository root, whose config.yaml has no tracker.jira.base_url. Once a Jira event is supplied, Fullsend rejects the run during Jira environment setup before it can fetch any ticket context.
Agent Prompt
## Issue description
A Jira-sourced run requires `tracker.jira.base_url` in the config loaded from `--fullsend-dir`; the root workspace config lacks it.
## Fix Focus Areas
- .github/workflows/jira-context-verification.yml[150-154]
- config.yaml[1-36]
## Recommended Fix
Supply valid Jira tracker connection settings in the root workspace config used by this workflow, or create a workflow-specific Fullsend workspace with those settings.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| GH_TOKEN: ${{ github.token }} | ||
| REPO_FULL_NAME: ${{ matrix.target-repo }} | ||
| TARGET_REPO_DIR: ${{ github.workspace }}/target-repo | ||
| ANTHROPIC_VERTEX_PROJECT_ID: ${{ vars.EVALS_VERTEX_PROJECT_ID }} | ||
| GOOGLE_CLOUD_PROJECT: ${{ secrets.E2E_GCP_PROJECT_ID }} | ||
| CLOUD_ML_REGION: ${{ vars.EVALS_GCP_REGION }} |
There was a problem hiding this comment.
5. Missing variables stop agent startup 🔗 Cross-repo conflict ≡ Correctness
The run step omits GIT_BOT_EMAIL and PUSH_TOKEN, although the code harness references both and Fullsend rejects unresolved harness environment variables. Even after supplying a Jira event and tracker configuration, this workflow reaches environment validation without those values and stops before the agent runs.
Agent Prompt
## Issue description
The selected code harness references variables absent from the workflow environment, and Fullsend fails validation when they are unset.
## Fix Focus Areas
- .github/workflows/jira-context-verification.yml[129-154]
- harness/code.yaml[86-107]
## Recommended Fix
Supply the required bot-email and push-token environment entries for this no-publication run, using appropriate non-publishing values where supported. Validate the composed harness against the complete workflow environment.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Risk Assessment: moderate (2/5) DetailsSingle new CI workflow file touching a protected path with no security-sensitive or dependency changes by an established contributor. Previous runRisk Assessment: moderate (2/5) DetailsSingle new CI workflow file touching a protected path with no security-sensitive or dependency changes by an established contributor. |
ReviewFindingsMedium
Low
Next steps:
Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImFwaS1jb250cmFjdCIsImZpbGUiOiIuZ2l0aHViL3dvcmtmbG93cy9qaXJhLWNvbnRleHQtdmVyaWZpY2F0aW9uLnltbCIsImlkIjoiZl8yOGU1M2M4NGEzMDJiYzlmIiwibGluZSI6MTM0LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImFwaS1jb250cmFjdCIsImZpbGUiOiIuZ2l0aHViL3dvcmtmbG93cy9qaXJhLWNvbnRleHQtdmVyaWZpY2F0aW9uLnltbCIsImlkIjoiZl8xY2ZhYjFmYzliYmM4ODhkIiwibGluZSI6MTUxLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6Im1pc3NpbmctYXV0aG9yaXphdGlvbiIsImZpbGUiOiIuZ2l0aHViL3dvcmtmbG93cy9qaXJhLWNvbnRleHQtdmVyaWZpY2F0aW9uLnltbCIsImlkIjoiZl80ZjE2ZDFkZTQ1N2U3ZTdiIiwibGluZSI6MSwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiaW50ZW50LWNvaGVyZW5jZSJ9LHsic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImRlc2lnbi1kaXJlY3Rpb24iLCJmaWxlIjoiLmdpdGh1Yi93b3JrZmxvd3MvamlyYS1jb250ZXh0LXZlcmlmaWNhdGlvbi55bWwiLCJpZCI6ImZfOTYxNzFhNWI5NjczMGY2MyIsImxpbmUiOjIzLCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJpbnRlbnQtY29oZXJlbmNlIn1dfQ== --> ReviewFindingsMedium
Low
Next steps:
|
Signed-off-by: apetruni <apetruni@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 2:28 PM UTC · Completed 2:37 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.52 |
waynesun09
left a comment
There was a problem hiding this comment.
Two findings from a review pass at 3e7dca7, posted inline. Neither overlaps the existing qodo or fullsend-ai-review threads.
|
|
||
| - name: Run code agent without post-script | ||
| env: | ||
| FULLSEND_WORK_ITEM_URL: ${{ vars.JIRA_BASE_URL }}/browse/${{ matrix.issue-key }} |
There was a problem hiding this comment.
[HIGH] Required Jira variable and secrets do not exist, so every leg gets an empty Jira URL and token
The run step reads vars.JIRA_BASE_URL, secrets.FULLSEND_JIRA_TOKEN and secrets.FULLSEND_JIRA_EMAIL. None of the three exists in fullsend-ai/agents: not among the repo Actions variables or secrets, and not among the org secrets or variables visible to the repo.
The push-triggered run on this head (run 45194260330) shows it: all four legs ran with FULLSEND_WORK_ITEM_URL: /browse/RHOAIENG-..., an empty JIRA_BASE_URL and an empty FULLSEND_JIRA_TOKEN and FULLSEND_JIRA_EMAIL. Those legs failed first on the already-reported Vertex credential problem. Fixing that, the event-file problem and the tracker-config problem would still leave a relative work-item URL and no Jira credential, so no leg can fetch Jira context. The PR's test plan never says these must be created.
Suggestion: Add a preflight step that fails with a clear ::error:: when JIRA_BASE_URL, FULLSEND_JIRA_TOKEN or FULLSEND_JIRA_EMAIL is empty, as functional-tests.yml does with its secrets check. Say in the PR body which variable and secrets a maintainer must create, and with what Jira scope (browse-only is enough), before dispatching.
Verified: reproduced: gh api repos/fullsend-ai/agents/actions/{variables,secrets,organization-secrets,organization-variables}; gh run view 45194260330 --log-failed shows empty values at 3e7dca7; raised by: Claude
| --output-dir "$output_dir" \ | ||
| --no-post-script | ||
|
|
||
| - name: Upload run artifacts |
There was a problem hiding this comment.
[HIGH] Unscrubbed run output, including non-public Jira ticket content, is uploaded as an artifact of a public repo
The upload step runs with if: always() and archives the whole ${{ runner.temp }}/fullsend-output-<type>/ directory for 30 days. Once the run works, that directory holds transcripts and tool output: Jira issue bodies, comments, parent issues and downloaded attachments, which are exactly what this workflow sets out to fetch.
- All four RHOAIENG tickets return 404 to an anonymous request on redhat.atlassian.net (checked for RHOAIENG-103574 and RHOAIENG-96376), so they are not public.
- fullsend-ai/agents is a public repo, and any signed-in GitHub user can download its workflow artifacts. The push run already published four artifacts (
jira-context-*). - fullsend's action builds its uploaded copy through
fullsend prepare-artifacts(ADR 0161 artifact levels), andfunctional-tests.ymluploads only aftereval/scripts/scrub-eval-results.shsucceeds. This workflow does neither.
The existing qodo thread covers target-repo hooks copying runner credentials into this directory. This finding is about Jira content being published, which that thread does not cover.
Suggestion: Build the upload with fullsend prepare-artifacts and upload only its output directory, or use the scrub-then-upload pattern from functional-tests.yml with if-no-files-found: error. Better still, use fixture tickets whose content may be public, or run the inspection in a private repo or on a private runner. At minimum, get the ticket owners to confirm that publishing the content is acceptable.
Verified: read code at head; reproduced: gh api repos/fullsend-ai/agents (visibility public), anonymous curl to /rest/api/3/issue/ returns 404, run 45194260330 artifacts listed at 3e7dca7; raised by: Claude, DeepSeek
| FULLSEND_WORK_ITEM_URL: ${{ vars.JIRA_BASE_URL }}/browse/${{ matrix.issue-key }} | ||
| JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }} | ||
| FULLSEND_FORGE: github | ||
| FULLSEND_TRACKER: jira |
There was a problem hiding this comment.
[medium] api-contract
Still present: FULLSEND_TRACKER=jira does not activate the Jira overlay. The fullsend CLI derives the overlay event and tracker provenance from --event-file or a dispatch payload containing _normalized_event, neither of which this workflow supplies. harness/code.yaml selects Jira using event.source.system == "jira", so this invocation keeps the GitHub pre-script instead of fetching the selected Jira ticket.
Suggested fix: Generate a valid normalized Jira event for each matrix ticket and pass it through --event-file, including its entity key and browse URL.
| output_dir="${RUNNER_TEMP}/fullsend-output-${{ matrix.issue-type }}" | ||
| mkdir -p "$output_dir" | ||
| fullsend run code \ | ||
| --fullsend-dir "$GITHUB_WORKSPACE" \ |
There was a problem hiding this comment.
[medium] api-contract
Still present: --fullsend-dir points to the repository root, whose config.yaml does not configure tracker.jira.base_url. Setting JIRA_BASE_URL in the environment does not supply that configuration; once a normalized Jira event is supplied, fullsend fails with 'tracker.jira.base_url is not configured' before starting the sandbox.
Suggested fix: Prepare a run configuration that preserves the code harness registration and configures tracker.jira.base_url for the intended Jira site, and point --fullsend-dir at that configuration.
| - name: Install OpenShell CLI | ||
| run: .fullsend-source/.github/scripts/install-openshell.sh | ||
|
|
||
| - name: Authenticate to GCP |
There was a problem hiding this comment.
[medium] api-contract
The WIF credential file produced by google-github-actions/auth is passed to fullsend without conversion for sandbox use, and the workflow does not supply FULLSEND_GCP_PROJECT_ID/FULLSEND_GCP_WIF_PROVIDER. functional-tests.yml runs scripts/prepare-sandbox-credentials.sh right after the same auth step because the sandbox cannot reach the OIDC endpoint in credential_source.url; this workflow skips that step, so inference cannot start.
Suggested fix: Run scripts/prepare-sandbox-credentials.sh after authentication and before fullsend, as functional-tests.yml does, or configure fullsend's native Actions WIF preparation inputs.
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: |
There was a problem hiding this comment.
[low] permission-expansion
The new push trigger runs the credential-bearing job (FULLSEND_JIRA_TOKEN, FULLSEND_JIRA_EMAIL, id-token: write) automatically on feature-branch commits with no protected environment or approval gate. This is hygiene rather than a new privilege boundary, since pushing requires write access and a writer can already dispatch the same job.
Suggested fix: Remove the feature-branch push trigger and keep manual verification; optionally put the credential-bearing job behind a protected environment with required approval.
| @@ -0,0 +1,166 @@ | |||
| name: Jira Context Verification | |||
There was a problem hiding this comment.
[low] missing-authorization
Still present: this 166-line new workflow has no linked GitHub issue authorizing the work (AISDLC-624 is a Jira key only).
Suggested fix: Link an authorized tracking GitHub issue.
| timeout-minutes: 45 | ||
| permissions: | ||
| contents: read | ||
| id-token: write |
There was a problem hiding this comment.
[low] design-direction
Still present: the job matrix hardcodes specific Jira issue keys (RHOAIENG-) and third-party repositories (opendatahub-io/) rather than workflow_dispatch inputs or a configurable fixture.
Suggested fix: Parameterize via workflow_dispatch inputs or externalize the matrix.
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: |
There was a problem hiding this comment.
[low] scope-creep
The incremental commit adds a push trigger on branch test/aisdlc-624-jira-context. It does not remediate a prior finding and contradicts the PR body's description of a manual workflow dispatched after merge, leaving a temporary test-branch trigger in a workflow destined for main.
Suggested fix: Remove the push: trigger (lines 8-10), keeping workflow_dispatch as the sole trigger.
Summary
Test plan