Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 166 additions & 0 deletions .github/workflows/jira-context-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: Jira Context Verification

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] missing-authorization

The PR adds a new 163-line workflow with no linked GitHub issue in fullsend-ai/agents; scope is tracked only by the external Jira ticket AISDLC-624 named in the PR body.

Suggested fix: Link an authorized tracking issue in fullsend-ai/agents that defines the requirements and scope for this verification workflow.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.


permissions:
contents: read

on:
workflow_dispatch:
push:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

branches:
- test/aisdlc-624-jira-context

concurrency:
group: jira-context-verification-${{ github.ref }}
cancel-in-progress: false

jobs:
verify:
name: Verify ${{ matrix.issue-type }}
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: read
id-token: write
Comment on lines +21 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

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

Dismiss ↗ | View ↗

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

strategy:
fail-fast: false
matrix:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] design-direction

The workflow hardcodes external Jira ticket keys (RHOAIENG-) and third-party target repositories (opendatahub-io/) in a permanent CI matrix with no workflow_dispatch inputs, tying a maintained workflow to external ticket and repo state.

Suggested fix: Parameterize the workflow with workflow_dispatch inputs (issue-key, issue-type, target-repo), or move reproducible verification cases into the eval/ harness.

include:
- issue-type: story
issue-key: RHOAIENG-103574
target-repo: opendatahub-io/data-connect-hub
- issue-type: task
issue-key: RHOAIENG-103762
target-repo: opendatahub-io/eval-hub-contrib
- issue-type: bug
issue-key: RHOAIENG-103039
target-repo: opendatahub-io/feast
- issue-type: epic
issue-key: RHOAIENG-96376
target-repo: opendatahub-io/rhoai-mcp
steps:
- name: Check out agents harness
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.sha }}
persist-credentials: false

- name: Check out target repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: ${{ matrix.target-repo }}
path: target-repo
persist-credentials: false

- name: Check out fullsend source
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: fullsend-ai/fullsend
ref: main
path: .fullsend-source
Comment on lines +57 to +59

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

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

Dismiss ↗ | View ↗

persist-credentials: false

- name: Set up Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: .fullsend-source/go.mod
cache-dependency-path: .fullsend-source/go.sum

- name: Build fullsend
run: |
make -C .fullsend-source go-build
echo "$PWD/.fullsend-source/bin" >> "$GITHUB_PATH"
.fullsend-source/bin/fullsend --version

- name: Install Podman
run: |
sudo apt-get update
sudo apt-get install -y podman

- name: Configure rootless Podman
run: |
whoami_user="$(whoami)"
grep -q "^${whoami_user}:" /etc/subuid || sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 "${whoami_user}"
podman system migrate

- name: Start Podman API service
run: |
systemctl --user start podman.socket
SOCKET_PATH="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/podman/podman.sock"
for _i in $(seq 1 30); do
podman --url "unix://${SOCKET_PATH}" info >/dev/null 2>&1 && break
sleep 1
done
if ! podman --url "unix://${SOCKET_PATH}" info >/dev/null 2>&1; then
echo "::error::Podman socket not ready at ${SOCKET_PATH}"
systemctl --user status podman.socket podman.service --no-pager || true
journalctl --user -u podman.socket -u podman.service --no-pager -n 40 || true
exit 1
fi

- name: Configure OpenShell gateway
run: |
eval "$(grep -E '^OPENSHELL_(VERSION|SHA)=' .fullsend-source/.github/scripts/openshell-version.sh)"
if [ -z "$OPENSHELL_VERSION" ] || [ -z "$OPENSHELL_SHA" ]; then
echo "::error::Failed to resolve OpenShell version from fullsend checkout"
exit 1
fi
echo "OPENSHELL_VERSION=${OPENSHELL_VERSION}" >> "$GITHUB_ENV"
echo "OPENSHELL_SHA=${OPENSHELL_SHA}" >> "$GITHUB_ENV"
mkdir -p "$HOME/.config/openshell"
echo "OPENSHELL_BIND_ADDRESS=0.0.0.0" > "$HOME/.config/openshell/gateway.env"
cat > "$HOME/.config/openshell/gateway.toml" << EOF
[openshell]
version = 2

[openshell.gateway]
compute_driver = "podman"

[openshell.drivers.podman]
supervisor_image = "ghcr.io/nvidia/openshell/supervisor:${OPENSHELL_VERSION}"
health_check_interval_secs = 10
EOF

- name: Install OpenShell CLI
run: .fullsend-source/.github/scripts/install-openshell.sh

- name: Authenticate to GCP

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

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 }}
Comment on lines +126 to +130

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Dismiss ↗ | View ↗


- name: Run code agent without post-script
env:
FULLSEND_WORK_ITEM_URL: ${{ vars.JIRA_BASE_URL }}/browse/${{ matrix.issue-key }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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

JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }}
FULLSEND_FORGE: github
FULLSEND_TRACKER: jira

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] api-contract

FULLSEND_TRACKER=jira does not select Jira routing. harness/code.yaml gates the Jira overlay (Jira provider, scripts/pre-code-jira.sh, ISSUE_URL from FULLSEND_WORK_ITEM_URL) on has(event.source) && event.source.system == "jira", i.e. a normalized event. This manual workflow supplies no --event-file, so only the GitHub overlay matches and the default scripts/pre-code.sh runs, which requires a positive-integer ISSUE_NUMBER and a GitHub issue URL. The run fails before any Jira context verification happens.

Suggested fix: Generate a valid normalized Jira event for each matrix ticket and pass it through --event-file, including source.system=jira and the ticket's entity key and browse URL.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

FULLSEND_JIRA_TOKEN: ${{ secrets.FULLSEND_JIRA_TOKEN }}
FULLSEND_JIRA_EMAIL: ${{ secrets.FULLSEND_JIRA_EMAIL }}
CODE_FORCE: true
CODE_JIRA_STARTED_TRANSITION: off
CODE_JIRA_PR_READY_TRANSITION: off
GH_TOKEN: ${{ github.token }}
REPO_FULL_NAME: ${{ matrix.target-repo }}
TARGET_REPO_DIR: ${{ github.workspace }}/target-repo
Comment on lines +143 to +145

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Dismiss ↗ | View ↗

ANTHROPIC_VERTEX_PROJECT_ID: ${{ vars.EVALS_VERTEX_PROJECT_ID }}
GOOGLE_CLOUD_PROJECT: ${{ secrets.E2E_GCP_PROJECT_ID }}
CLOUD_ML_REGION: ${{ vars.EVALS_GCP_REGION }}
Comment on lines +143 to +148

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Dismiss ↗ | View ↗

run: |
set -euo pipefail
output_dir="${RUNNER_TEMP}/fullsend-output-${{ matrix.issue-type }}"
mkdir -p "$output_dir"
fullsend run code \
--fullsend-dir "$GITHUB_WORKSPACE" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Dismiss ↗ | View ↗

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] api-contract

--fullsend-dir "$GITHUB_WORKSPACE" selects the repository-root config.yaml, which has no tracker.jira configuration; the CLI reads tracker.jira from that directory's config. Exporting JIRA_BASE_URL alone likely does not configure the CLI's Jira connection, so Jira-sourced runs may stop even after a normalized Jira event is supplied. (The CLI's exact behavior in fullsend main could not be confirmed from this repo.)

Suggested fix: Prepare a workflow-local fullsend configuration that preserves the existing agent registration and sets tracker.jira.base_url from the intended Jira site, then use it for the run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

--target-repo "$GITHUB_WORKSPACE/target-repo" \
--output-dir "$output_dir" \
--no-post-script
Comment on lines +153 to +157

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Dismiss ↗ | View ↗


- name: Upload run artifacts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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), and functional-tests.yml uploads only after eval/scripts/scrub-eval-results.sh succeeds. 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

if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: jira-context-${{ matrix.issue-type }}
path: |
${{ runner.temp }}/fullsend-output-${{ matrix.issue-type }}/
retention-days: 30
Loading