Skip to content

feat(#9132): read Jira authorization lists from the environment - #9262

Merged
waynesun09 merged 1 commit into
fullsend-ai:mainfrom
gwenneg:feat/9132-jira-auth-from-env
Nov 24, 2026
Merged

waynesun09 merged 1 commit into
fullsend-ai:mainfrom
gwenneg:feat/9132-jira-auth-from-env

Conversation

@gwenneg

@gwenneg gwenneg commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The jira authorization lists in .fullsend/config.yaml can now come from an environment variable, so account and group IDs stay out of a public repository:

authorization:
  - provider: jira
    write:
      groups_from: FULLSEND_JIRA_WRITE_GROUPS   # value: "<group-id-1>,<group-id-2>"

Related Issue

Closes #9132

Changes

Config and poller

  • write: and triage: accept groups_from and accounts_from. The value is a list separated by commas or newlines.
  • An unset or empty variable grants no one. The poller logs a warning that names the variable, never its value.
  • Config loading rejects a role that sets both forms of one field, and an empty or invalid variable name.

Managed GitHub poll workflow

  • The managed caller passes FULLSEND_JIRA_WRITE_GROUPS, FULLSEND_JIRA_WRITE_ACCOUNTS, FULLSEND_JIRA_TRIAGE_GROUPS and FULLSEND_JIRA_TRIAGE_ACCOUNTS to the poll step. It passes only the ones the config names, so existing callers don't change.
  • reusable-poll-jira.yml now sets the dispatch matrix from a second job that has no secrets.

repos install

  • It fails before any write when the repository's jobs run a release that predates the new keys.
  • It warns when a list variable won't reach the poller.

Docs

  • The Jira guide covers GitHub secrets, Vault or another secret store, and GitLab CI/CD variables.
  • For a store with no GitHub Action, the guide gives three numbered steps. Step 1 joins the value into one line, so masking covers a list stored one entry per line.
  • The GitLab section says to use a name without the FULLSEND_ prefix, because repos status reports an unmanaged FULLSEND_ variable as an orphan.
  • The guide says the acting account's ID is still in the dispatch record, in the artifact and in agent job logs.
  • The GitLab section gives the GitLab versions for masking a comma list (15.9) and for Masked and hidden (17.4). It says GitLab refuses to save a value it can't mask, and not to save the list unmasked.
  • Examples use a placeholder account ID.

Why the matrix is set by a second job

GitHub drops a job output that contains the value of a secret the job has. The matrix contains the ID of the account that acted. So if FULLSEND_JIRA_WRITE_ACCOUNTS holds one account ID, the matrix is dropped every time that person triggers an agent. The poller has already advanced its Jira checkpoints by then, so those dispatches are lost and the run still shows green.

Fix: the poll job saves dispatches.json as an artifact (kept 1 day) and outputs only a count and a random artifact suffix. A new matrix job, which has no secrets, reads the file and sets the output. The caller and the workflow's matrix output are unchanged.

Each call names its artifact with its own suffix, so two calls in one run don't share it.

Trade-offs

  • A failed upload or download would lose that cycle's dispatches, because the checkpoints are already advanced. Each is tried twice.
  • GitHub's check also used to block any of the four Jira secrets in the matrix. The poll job now checks for that itself: it fails if dispatches.json contains FULLSEND_JIRA_TOKEN, FULLSEND_JIRA_EMAIL, FULLSEND_JIRA_CLIENT_ID or FULLSEND_JIRA_CLIENT_SECRET. It trims the values first, as the CLI does. It searches the decoded strings of each record and its event_payload, so it also finds a credential that JSON escaped.
  • The artifact holds the same records that harness jobs already print in their logs.

Alternatives I ruled out

  • Escaping list values in the poller's output: it works around a GitHub safety check and breaks if any step rewrites the matrix.
  • Passing only the group secrets: it drops account-ID privacy, which is the point of the issue.
  • Having the poller start agent runs itself, as on GitLab: it's the cleanest fix but a redesign. See "Not in this PR".

Install checks

Error: the release must support the new keys. Every job runs the CLI at the repository's fullsend_ref, and fullsend_ref doesn't follow CLI upgrades. v0.54.0 rejects groups_from as an unknown field, so without this check install would commit a config that no job can load.

  • It runs on GitHub and GitLab, with polling on or off.
  • It reads reusable-poll-jira.yml at the pinned ref and looks for FULLSEND_JIRA_WRITE_GROUPS, which lands in the same commit as the CLI support.
  • It also covers a repository with no fullsend_ref when install runs from a build with no release ref. Install then leaves the scaffold at its stamped ref, so the check reads that ref.
  • It's skipped when the repository is unpinned or pinned to the running release.
  • A vendored install runs its own binary and workflows, so it's skipped too, with one exception: the managed GitHub poll caller passes a list secret. That caller always calls upstream reusable-poll-jira.yml at the pinned ref, and GitHub rejects it when the workflow there doesn't declare the secret (run against v0.55.0).
  • On GitHub with polling enabled, it also reads each reusable-poll-jira.yml that a poll caller you maintain pins, and fails if one predates the keys: that workflow installs the CLI at its own ref. A vendored install is skipped, because the old workflow runs the vendored binary there.
  • repos status reports the same errors, for an installed repository and for one that is not installed yet.
  • This PR does not increment the config schema version (internal/config/managed-config-schema, 3 on main since feat(#8143)!: let agents entries carry a harness: block (ADR 0162) #9422), although older releases reject the new keys. This check refuses them for an older ref instead. A comment in that file says so.

Warning: a list variable won't reach the poller. On GitHub, with polling enabled:

  • the config names a variable other than the four above, and the managed caller, or a caller you maintain, calls reusable-poll-jira.yml. That workflow accepts only those four, and GitHub rejects a caller that passes it another secret (run);
  • a caller you maintain calls reusable-poll-jira.yml without passing one of the four that the config names.

It's a warning, not an error, because a self-hosted runner can still set the variable. Without it the list grants no one, which fails closed.

Not in this PR

  • GitLab reports FULLSEND_JIRA_* variables as orphans, and repos status then exits with an error. This already happens on main for the Jira credentials that install writes since repos install: manage Jira polling for GitLab #9108. It will also happen for list variables with a FULLSEND_ name. One fix covers both.
  • The poller starts agent runs itself on GitHub. That would remove the artifact hand-off and the checkpoint ordering problem.

Testing

  • make lint passes (stage changes first, then run)
  • Tests added/updated for new or modified logic

Details:

  • The two new uses: lines reuse pins the repo already has, and pinact passes.
  • Unit tests cover the new keys, the conversion to the poller's lists, the unset-variable warning, the caller rendering, the install check and both install warnings.
  • TestJiraPollCallerPollAlignment checks that the job holding the secrets outputs only a count and a random suffix, and that the matrix job references no secrets.
  • TestJiraPollWorkflowCheckDispatches runs the check step once per Jira secret, including a token that contains " and <. TestJiraPollWorkflowSecretThreading checks that the step receives all four and no list secret.
  • I ran the managed caller on a fork, calling reusable-poll-jira.yml at e49176a8e (an earlier head of this PR) through workflow_call, with the real CLI and a mock Jira:
    • 0-dispatch cycle: the matrix job is skipped, the caller gets {"include":[]}, and dispatch is skipped.
    • List secret equal to the actor ID: the list secrets arrive through the caller's secrets: mapping, and all 4 dispatches reach the dispatch job.
    • These runs predate later pushes, which changed only the install warning, the install check for vendored installs, the GitLab text in the guide, the check step (no fromjson, since fix(jirapoll)!: unmarshal EventPayload as structured JSON in DispatchRecord #7518 made event_payload an object, and two more secrets checked), and tests. The changed check step is covered by TestJiraPollWorkflowCheckDispatches, not by a runner.
    • Differences from a real install: uses: points to the commit on the fork, the trigger is a push, dispatch calls a stub that prints the matrix, a show job is added, and the CLI is a vendored build of the same commit behind a wrapper that starts the mock.
  • Two calls in one run: both got the second poll's dispatches before the suffix (run), and each gets its own with it (run). "Re-run failed jobs" still reads the same artifact (run).
  • The secret-store recipe ran on a GitHub runner with fake IDs on 8 input shapes (run, jobs join_tr__*). No ID is printed.
  • Earlier, I ran the real poller inside copies of the workflow's steps on GitHub (run). The CLI was built from this commit and polled a mock Jira, with fake secrets. The poll, check, save and read steps and the whole matrix job were copied unchanged.
    • The poller read accounts_from and groups_from from secrets. The listed account and the listed group's member were dispatched, and a stranger was not.
    • The matrix arrived although one list secret equals an actor ID in it, and the matrix job downloaded the artifact with permissions: {}.
    • With the first upload and the first download made to fail, the second tries ran and the matrix was still built.
  • An earlier run with a fixed dispatch file covers the rest (run):
    • a control job in the old single-job shape lost its output (Skip output 'matrix' since it may contain secret);
    • the credential check caught a leaked token, including one stored with a trailing space, and didn't fail on a token ending with a newline.
  • I ran the built CLI in a Linux container against the same mock for four cases: a comma list, one entry per line, both variables unset (no dispatch, one warning per variable), and one variable empty.
  • Not tested: a real Jira site, and the GitLab variable settings in the guide. They follow GitLab's documentation and its source at the release tags; I did not run them on a GitLab instance.

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

🤖 Generated with Claude Code

@gwenneg
gwenneg requested a review from a team as a code owner November 10, 2026 09:21
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

E2E tests are running

Authorization passed for this commit. See the E2E Tests workflow for results.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Read Jira authorization lists from environment variables

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Allow Jira write and triage lists to come from environment variables instead of public
 configuration.
• Forward only configured GitHub secrets and build dispatch matrices in a secret-free job.
• Add fail-closed validation, install warnings, tests, and setup guidance.
Diagram

graph TD
  CFG["Jira config"] --> INSTALL["Repo install"] --> CALLER["Managed caller"] --> POLL["Jira poll"] --> FILE[("Dispatch artifact")] --> MATRIX["Matrix job"] --> DISPATCH["Agent dispatch"]
  CFG --> POLL
Loading
High-Level Assessment

Keep the environment-backed lists and secret-free matrix job. Inline lists would retain the public-repository exposure, while emitting the matrix from the secret-bearing poll job would risk GitHub dropping its output. The artifact boundary preserves the existing dispatch interface.

Files changed (24) +1059 / -117

Enhancement (10) +455 / -62
reusable-poll-jira.ymlIsolate matrix output from Jira secrets +106/-15

Isolate matrix output from Jira secrets

• Declares optional authorization-list secrets for the poll step. Checks dispatch records for Jira credentials, transfers nonempty records by artifact with retries, and builds the matrix in a second job without secrets.

.github/workflows/reusable-poll-jira.yml

poll.goResolve Jira authorization lists for polling +30/-12

Resolve Jira authorization lists for polling

• Passes environment access into Jira poll options so list variables are resolved for each poll. Empty resolved lists deny access and produce warnings naming variables, without logging their values.

internal/cli/poll.go

poll_jira_gitlab.goEnable environment-backed lists in GitLab polling +1/-1

Enable environment-backed lists in GitLab polling

• Passes environment access to the shared Jira poll options builder for GitLab.

internal/cli/poll_jira_gitlab.go

config.goAdd validated environment-backed Jira actor lists +99/-5

Add validated environment-backed Jira actor lists

• Adds 'groups_from' and 'accounts_from', list resolution for comma- or newline-separated values, and collection of referenced variable names. Rejects invalid or empty names and fields specified in both inline and environment forms.

internal/config/config.go

managed.goPreserve environment names when cloning Jira lists +4/-4

Preserve environment names when cloning Jira lists

• Copies the full Jira actor list before independently cloning its inline slices, retaining the new '*_from' fields.

internal/config/managed.go

converge.goCheck Jira list support before install writes +6/-3

Check Jira list support before install writes

• Collects the expanded effective Jira poll state during discovery and invokes the compatibility check before reconciliation writes.

internal/repos/converge.go

github_jira_poll.goForward configured secrets and warn about omissions +78/-8

Forward configured secrets and warn about omissions

• Selects supported authorization secrets for the managed caller. Warns when a managed caller cannot forward a configured name or a user-owned reusable-workflow caller omits one.

internal/repos/github_jira_poll.go

jira_poll.goTrack list names and gate unsupported refs +93/-11

Track list names and gate unsupported refs

• Collects Jira authorization variable names from effective configuration even when polling is disabled. Checks pinned or retained scaffold refs for feature support before writes and passes names and warnings to reconciliation.

internal/repos/jira_poll.go

jira-poll-per-repo.yamlAdd poll-only list secret slots to caller template +7/-1

Add poll-only list secret slots to caller template

• Adds the four authorization-list secret mappings to the poll job, leaving the dispatch job without them.

internal/scaffold/fullsend-repo/templates/jira-poll-per-repo.yaml

jira_poll.goRender only requested Jira list secrets +31/-2

Render only requested Jira list secrets

• Defines the four supported managed-caller names and removes unused secret mappings during rendering, preserving callers whose configuration names no list secrets.

internal/scaffold/jira_poll.go

Tests (8) +408 / -46
poll_test.goTest poll authorization resolution and warnings +39/-8

Test poll authorization resolution and warnings

• Covers equivalent inline and environment-backed authorization, empty-variable denial and warnings, and unchanged behavior without a Jira provider.

internal/cli/poll_test.go

config_test.goTest Jira list parsing and validation +98/-2

Test Jira list parsing and validation

• Covers mixed list forms, splitting and trimming, blank values, variable-name collection, and rejection of conflicting or invalid configuration. Replaces the example account ID.

internal/config/config_test.go

effective_test.goVerify effective configuration retains list sources +5/-1

Verify effective configuration retains list sources

• Checks that effective YAML includes 'groups_from' and cloning retains environment-variable names.

internal/config/effective_test.go

github_jira_poll_test.goTest caller forwarding and install warnings +115/-7

Test caller forwarding and install warnings

• Verifies selective secret forwarding, rejection of an older pin before writes, and warnings for managed and user-owned callers.

internal/repos/github_jira_poll_test.go

jira_poll_test.goTest effective state and release compatibility +87/-11

Test effective state and release compatibility

• Covers supported, unsupported, unavailable, and retained refs, plus collection of list variables when Jira is not the selected tracker.

internal/repos/jira_poll_test.go

workflow_test_helper_test.goAdd a feature-capable workflow fixture +12/-1

Add a feature-capable workflow fixture

• Introduces a reusable-workflow fixture declaring the new list secrets and uses it for the current-release test pin.

internal/repos/workflow_test_helper_test.go

jira_poll_test.goVerify caller secret scope and workflow contract +43/-11

Verify caller secret scope and workflow contract

• Tests selective poll-job forwarding, absence of list secrets in agent dispatch, and alignment with the reusable workflow's new matrix job.

internal/scaffold/jira_poll_test.go

workflow_call_alignment_test.goAssert reusable poll workflow secret wiring +9/-5

Assert reusable poll workflow secret wiring

• Checks that all four list secrets are optional in the reusable workflow, reach its poll step, and appear in the caller template.

internal/scaffold/workflow_call_alignment_test.go

Documentation (6) +196 / -9
repos.mdDocument install behavior for environment-backed lists +14/-1

Document install behavior for environment-backed lists

• Explains supported managed-caller secret names, warnings for unsupported or unforwarded names, secret ownership, and the pre-write check for older pinned releases.

docs/cli/repos.md

operations.mdList optional Jira authorization secrets +1/-0

List optional Jira authorization secrets

• Adds the four optional repository secrets to the operations inventory and clarifies that users manage them rather than install or uninstall.

docs/guides/getting-started/operations.md

infrastructure-reference.mdIdentify user-managed Jira list secrets +5/-0

Identify user-managed Jira list secrets

• Adds the optional group and account list secrets to the infrastructure reference.

docs/guides/infrastructure/infrastructure-reference.md

custom-poller-example.mdWarn custom pollers about secret-masked matrix outputs +8/-0

Warn custom pollers about secret-masked matrix outputs

• Advises workflows receiving Jira list secrets to produce the matrix in a separate job without those secrets.

docs/guides/user/custom-poller-example.md

jira-integration.mdExplain private Jira list setup across forges +149/-4

Explain private Jira list setup across forges

• Documents environment-backed lists, fail-closed behavior, managed GitHub secrets, external secret stores, and GitLab variables. Updates the workflow explanation, troubleshooting guidance, and example account ID.

docs/guides/user/jira-integration.md

config-reference.mdSpecify Jira environment-list configuration +19/-4

Specify Jira environment-list configuration

• Adds the four '*_from' fields and describes parsing, validation, missing-variable behavior, and managed GitHub secret-name limits. Replaces the example account ID.

docs/reference/config-reference.md

@qodo-code-review

qodo-code-review Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Private Jira account IDs reach artifacts ✗ Dismissed

Dismissed as Rejected

Description
The Check dispatches step scans only Jira credentials before Save dispatches uploads the
complete file, even though an actor ID in that file can equal a forwarded authorization-list secret.
When a listed account triggers a dispatch, repository readers can download that account ID from the
workflow artifact, including when the repository is public.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A dispatch record can contain an actor ID identical to a Jira authorization-list secret. The new handoff uploads that record without checking the list secrets, making the ID available to artifact readers.
## Fix Focus Areas
- .github/workflows/reusable-poll-jira.yml[138-169]
- .github/workflows/reusable-poll-jira.yml[181-219]
## Recommended Fix
Change the handoff so secret-bearing actor IDs are not published in a downloadable artifact or secretless job output. Preserve dispatch for listed actors rather than rejecting every dispatch whose actor ID equals a configured list secret; this may require dispatching directly from the poll job or a different access-controlled handoff.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Escaped credentials pass the dispatch check ✓ Resolved

Resolving commit: ed07311

Resolution reason
The check now decodes the dispatch JSON with jq, including the nested event_payload JSON strings,
and searches the decoded strings for each trimmed FULLSEND_JIRA_TOKEN / FULLSEND_JIRA_CLIENT_SECRET
value, without printing the value. A regression test uses a credential containing a JSON-escaped
character.
Description
Check dispatches searches the JSON file for literal credential bytes, but JSON marshaling escapes
characters such as backslashes, quotes and angle brackets. If a Jira comment contains a credential
with one of those characters, the scan misses its encoded representation and the dispatch file
proceeds to the artifact and matrix output.

3. Secret store steps are hard to follow ✓ Resolved

Resolving commit: ed07311

Resolution reason
The prose paragraph was replaced with a three-step numbered list (fetch value in script step, mask
with ::add-mask:: before printing, append NAME=value to $GITHUB_ENV), each with its command in a
code block, so the masking step is explicit and ordered.
Description
The Vault-or-other-store subsection gives the procedure for a store with no GitHub Action as one
prose paragraph: fetch the value in a script step, mask it with ::add-mask::, and append
NAME=value to $GITHUB_ENV, followed by a version constraint. A reader setting this up has to
pull three ordered actions out of a sentence, and the masking step is the one that keeps the value
out of logs, so it is easy to skip. The same subsection also describes the poll-job setup for
maintained workflows in prose and bullets, not numbered steps.

Grey Divider

Context sources
✅ Compliance rules (platform): 103 rules
✅ Skills: 5 invoked
  writing-user-docs
  writing-adrs
  check-patch-coverage
  cutting-releases
  adr-corner
✅ Web pages:
  +2 more
✅ Cross-repo context — repo relationships
  Explored: repo: fullsend-ai/experiments (sha: d4292120) — View relationship
  Explored: repo: fullsend-ai/.fullsend (sha: 5e159214) — View relationship
  Explored: repo: fullsend-ai/agents (sha: 82226d2a) — View relationship
✅ REVIEW.md
Review mode: Auto: 🧠 Deep: Dense security-sensitive change: authorization lists, secrets, workflow artifact handoff, install gating across 87 hunks.

Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread docs/guides/user/jira-integration.md Resolved
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Site preview

Preview: https://a8b2559a-site.fullsend-ai.workers.dev

Commit: 8639cdd41715a89c26407cd6601f0f13e9d69a5f

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

@waynesun09 waynesun09 left a comment

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.

Two review findings below, both MEDIUM.

Comment thread internal/repos/converge.go Resolved
Comment thread internal/repos/jira_poll.go Resolved
@qodo-code-review

Copy link
Copy Markdown

Fixed in ed07311. The check now parses the records and their event_payload, and searches the decoded strings. TestJiraPollWorkflowCheckDispatches runs the step with a credential that contains `` and <. --comment_id=4548996815

The fix for finding 2 (Escaped credentials pass the dispatch check) is in the checked-out code. I read .github/workflows/reusable-poll-jira.yml at lines 138-169.

  • The step now writes jq -r '.., (.[].event_payload | fromjson | ..) | strings' dispatches.json to dispatch-strings.txt. It decodes each record's event_payload and checks the decoded strings, not the raw JSON bytes.
  • Each trimmed FULLSEND_JIRA_TOKEN and FULLSEND_JIRA_CLIENT_SECRET is still matched with grep -qF, and the step still fails with ::error:: on a match.
  • The test TestJiraPollWorkflowCheckDispatches is in internal/scaffold/jira_poll_test.go. I read it in the diff but did not run it.

The catalog still lists this finding as active, so it should close on the next review. I have not dismissed it, since you didn't ask me to.

finding 1 (Private Jira account IDs reach artifacts) is a separate issue and is not addressed by this change. The step still checks only the token and client secret, and the full dispatches.json is still uploaded as an artifact. If you want that one closed, tell me to dismiss it, or push a change for it.

@waynesun09 waynesun09 left a comment

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.

Two review findings below, both MEDIUM.

Comment thread docs/guides/user/jira-integration.md Resolved

@waynesun09 waynesun09 left a comment

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.

Two review findings below, both MEDIUM.

Comment thread docs/guides/user/jira-integration.md Resolved
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 12, 2026
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 12, 2026
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 12, 2026
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 12, 2026
@gwenneg
gwenneg force-pushed the feat/9132-jira-auth-from-env branch from 5bcc93c to e49176a Compare November 12, 2026 15:45

@waynesun09 waynesun09 left a comment

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.

One review finding below, MEDIUM.

Comment thread internal/repos/github_jira_poll.go Resolved

@waynesun09 waynesun09 left a comment

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.

Two review findings below, both MEDIUM.

Comment thread internal/repos/jira_poll.go Resolved
Comment thread docs/guides/user/jira-integration.md Resolved
@gwenneg
gwenneg force-pushed the feat/9132-jira-auth-from-env branch 2 times, most recently from 196aa41 to f7888a5 Compare November 12, 2026 22:29
@gwenneg
gwenneg force-pushed the feat/9132-jira-auth-from-env branch from a989d8c to 22e1681 Compare November 18, 2026 22:19
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 18, 2026
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 18, 2026
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 18, 2026
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Nov 18, 2026
@gwenneg

gwenneg commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

I rebased and fixed conflicts.

@waynesun09 main is now at schema 3 (#9422). Do you want this PR to bump it to 4? It would undo an earlier fix in this PR: install would reject a vendored repository pinned to an older release when its config uses the new keys. Without the bump, the existing check still refuses the new keys for an older ref. I tested both cases locally with the repo's install test harness.

@waynesun09 waynesun09 left a comment

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.

Two MEDIUM findings from a review-only pass, posted inline.

Comment thread docs/guides/user/jira-integration.md Resolved
Comment thread internal/repos/jira_poll.go Resolved
…nment

The jira authorization entry's write and triage lists can now name an
environment variable with groups_from and accounts_from, so group and
account IDs stay out of a public repository's config.yaml.

Config and poller:
- The poller reads the variable on every poll. The value is a list
  separated by commas or newlines. An unset or empty variable grants
  no one, and the poller logs a warning that names the variable.
- Config loading rejects a role that sets both forms of one field, and
  an empty or invalid variable name.
- The poller never logs the values.
- The docs and the config test use a placeholder account ID.

Managed GitHub poll workflow:
- The managed caller forwards FULLSEND_JIRA_WRITE_GROUPS,
  FULLSEND_JIRA_WRITE_ACCOUNTS, FULLSEND_JIRA_TRIAGE_GROUPS and
  FULLSEND_JIRA_TRIAGE_ACCOUNTS to the poll step when config.yaml
  reads them. reusable-poll-jira.yml declares them as optional.
- A new job with no secrets sets the dispatch matrix output. GitHub
  drops a job output that contains a value of a secret the job has, and
  the matrix holds the acting account's ID, which can equal a list
  secret. The poll job saves the dispatch file as an artifact, after
  checking it for Jira credentials, including ones that JSON escaped.
  Each call names its artifact with a random suffix, so two calls in
  one run do not share it.

repos install:
- It fails before any write when config.yaml uses groups_from or
  accounts_from and the repository's jobs run a release that predates
  them, on any forge. Every job runs the CLI at the scaffold's ref, and
  an older CLI cannot load the config.
  repos status reports the same error.
  Without an upstream GitHub client, a stamped scaffold's ref is not
  checked.
  A vendored install runs its own binary, so it is checked only when
  the managed GitHub poll caller passes a list secret: that caller
  calls the upstream workflow at the pinned ref.
  A user-owned GitHub poll caller that pins a reusable-poll-jira.yml
  older than the keys fails too, unless the install is vendored: that
  workflow installs the CLI at its own ref.
- It warns about a variable name other than the four above, for the
  managed caller and for a user-owned caller of reusable-poll-jira.yml,
  because that workflow accepts only those four. It also warns about a
  user-owned caller that does not pass one of the four that the config
  names. It never writes or deletes these secrets.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Gwenneg Lepage <10584698+gwenneg@users.noreply.github.com>
@waynesun09

Copy link
Copy Markdown
Member

/fs-review

@waynesun09

Copy link
Copy Markdown
Member

/ok-to-test 8639cdd

@github-actions

Copy link
Copy Markdown

E2E authorized for 8639cdd41715a89c26407cd6601f0f13e9d69a5f (run). A new push needs a new /ok-to-test <sha>.

@waynesun09

Copy link
Copy Markdown
Member

@gwenneg Keep the schema at 3, as the PR has it. A bump would make older CLIs refuse every repository pinned to the new release, and would refuse vendored installs that work, while checkJiraAuthorizationEnvSupport already refuses the new keys for an older ref. The docs, the rollback order, and folding the check into the next schema bump are tracked in #9837.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:48 PM UTC · Completed 2:00 PM UTC

Commit: 8639cdd · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.47

@fullsend-ai-review fullsend-ai-review Bot added the risk/elevated PR risk: elevated label Nov 24, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

Large change touching a protected CI workflow and Jira authorization logic with high recent churn in touched files, mitigated by opt-in configuration and thorough acceptance criteria coverage.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

Low

  • [api-contract] internal/config/config.go:608 — The mutual-exclusion check in validateJiraProvider tests whether the decoded slice is non-nil, not whether the inline YAML key is present. yaml.v3 decodes groups: and groups: null to a nil slice, so write: {groups: null, groups_from: X} is accepted even though the comment on that line and the issue say a role cannot set both forms. The same applies to accounts. The effect is limited: groups_from wins and a null inline list grants no one, so nobody gains access.
    Remediation: In UnmarshalYAML, reject groups/accounts when the matching *_from key is also present, using key presence (which includes !!null values). Add tests for a bare key and an explicit-null key.

  • [missing-version-bump] internal/config/managed-config-schema:7 — groups_from/accounts_from are rejected by older releases, but the schema version stays at 3. The PR documents the exception in the file and guards the managed flow with checkJiraAuthorizationEnvSupport (repos install/repos status refuse the keys for an older pinned ref). That does not cover hand-edited configs or other tools that decide by schema version alone.
    Remediation: Keep the documented exception and note in the release notes that older CLIs reject configs using these keys, or bump the schema version with a previous-version renderer. Consider a sturdier capability check than the FULLSEND_JIRA_WRITE_GROUPS marker string.


Labels: PR changes repos install/status checks, a reusable CI workflow, and Jira integration docs.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

Comment thread internal/config/config.go Resolved
Comment thread internal/config/managed-config-schema Resolved
@fullsend-ai-review fullsend-ai-review Bot added component/install CLI install and app setup component/ci CI pipelines and checks component/docs User-facing documentation labels Nov 24, 2026

@waynesun09 waynesun09 left a comment

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.

Approving. All earlier MEDIUM findings are fixed and verified at this head; the two remaining LOWs are answered, and the schema follow-up is #9837.

@waynesun09
waynesun09 added this pull request to the merge queue Nov 24, 2026
Merged via the queue into fullsend-ai:main with commit f1d1364 Nov 24, 2026
104 of 105 checks passed

This branch was successfully deployed

1 active deployment
site-preview — 8639cdd4 Deployed Nov 21, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ci CI pipelines and checks component/docs User-facing documentation component/install CLI install and app setup risk/elevated PR risk: elevated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jira authorization: read write/triage lists from the environment (groups_from, accounts_from)

3 participants