Repository navigation
Conversation
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
PR Summary by QodoAllow repositories to opt out of Jira actor authorization
AI Description
Merge Risk
|
Code Review by Qodo
1.
|
Site previewPreview: https://2cf699da-site.fullsend-ai.workers.dev Commit: |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
jflowers
left a comment
There was a problem hiding this comment.
Council Review: APPROVE WITH ADVISORIES
7 reviewer runs completed (adversary, architect, curator, fullsend, gaze-testing, guard, testing); all succeeded. 8 findings: 0 CRITICAL, 0 HIGH, 2 MEDIUM, 6 LOW. All are test coverage and clarity hardening; the council found no defects in the authorization logic itself.
What this PR does well: the bypass is scoped to SystemJira events only, harness CEL triggers still apply, the default (omitted or true) preserves the existing policy, config validation is strict (bool scalar only, jira provider only, enforced in both UnmarshalYAML and ValidateAuthorization), the managed-config clone deep-copies the new pointer field, and the trade-off is documented across ADR 0177, the integration guide, architecture, normative authorization, config reference, and the threat model. CI is fully green including codecov/patch.
Advisories (details inline):
- MEDIUM: the new skip branch in
authorizeEventandAuthOptionsForJiraProviderhave no unit cases ininternal/harnessdispatch/auth_test.go, the owning package that unit-tests every other gate branch (divisor-testing) - MEDIUM: only the slash-command event kind is behaviorally tested of the three the docs promise under the opt-out; label-added, issue-opened, and list/allowlist combinations are untested (divisor-testing)
- LOW: clone-isolation assertion in
TestJiraCheckProjectMembersValidationis half-asserted and undocumented; the qodo bot's "fails on every run" claim is a false positive (divisor-gaze-testing, divisor-testing) - LOW: GitHub-event denial asserted outside the production
Matchpath (divisor-gaze-testing) - LOW: skip-path return of
jiraPollAuthorizationasserted field-by-field rather than as the full struct (divisor-testing) - LOW: the
ValidateAuthorizationguard for non-jira providers appears unreachable through the public parse API (divisor-testing) - LOW (security, for the record): the opt-out intentionally lets any Jira actor in the polled scope start agents; contained and documented per ADR 0177 (divisor-fullsend)
the contract looks solid overall. a few spots worth double-checking before it lands.
This review was generated by /uf.review-pr (AI-assisted).
waynesun09
left a comment
There was a problem hiding this comment.
Review comments below: three inline, and one in this body because its file is not in the diff.
MEDIUM: No version-skew preflight for the new check_project_members key (internal/repos/jira_poll.go, near line 196, not in this diff)
Older CLI releases validate jira provider keys against a fixed jiraProviderKeys set and reject unknown keys. A repository whose jobs run an older pinned fullsend_ref or scaffold ref will fail to load config.yaml in every job once it adds check_project_members. The repo already guards this exact failure class for groups_from/accounts_from with checkJiraAuthorizationEnvSupport, whose comment reads "an older CLI rejects the keys, so no job could load the config". No equivalent guard or documented minimum release exists for the new key.
Suggestion: Add a preflight in repos install similar to checkJiraAuthorizationEnvSupport for check_project_members, or document the minimum CLI release that accepts the key in the guide and config reference.
Verified: read code at head (jira_poll.go checkJiraAuthorizationEnvSupport, config.go jiraProviderKeys) at e018304; raised by: DeepSeek
Signed-off-by: eshulman2 <ellashulman1@gmail.com>
|
Addressed the review in b8060d6.
Validation: The broader race-and-coverage suites in |
waynesun09
left a comment
There was a problem hiding this comment.
Review comments below: one inline, and one in this body because its file is not in the diff.
MEDIUM: repos status does not run the new check_project_members support check, so status and install disagree (internal/repos/status.go, near line 415, not in this diff)
At converge.go:1623, convergeRepo calls checkJiraProjectMembersSupport before checkJiraAuthorizationEnvSupport. In status.go, the jiraAuthorizationEnvError closure (lines 406-416, used at 436 and 484) wraps only checkJiraAuthorizationEnvSupport. Take a repository that sets check_project_members in config.yaml and whose pinned fullsend_ref or installed scaffold ref predates this PR:
repos statusreports no configuration error.repos installfails with "does not support check_project_members".- Every job at the old ref rejects the config, because the older
jiraProviderKeysrejects unknown keys.
docs/cli/repos.md says dry-run, install and status agree.
Suggestion: Also call checkJiraProjectMembersSupport from the status closure, using the same convergeDiscovery and ConvergeConfig, and return the first error. Add a checkRepoStatus test for the old-pin case that mirrors TestConverge_JiraProjectMembers_RejectsOldPinBeforeWrites.
Verified: read code at head (status.go 403-490, converge.go 1623-1627) at b8060d6; raised by: Claude, DeepSeek
| if err != nil && !forge.IsNotFound(err) { | ||
| return fmt.Errorf("%s/%s: checking %s %q for check_project_members support: %w", resolved.Owner, resolved.Repo, source, ref, err) | ||
| } | ||
| if err != nil || !bytes.Contains(content, []byte(`yaml:"check_project_members,omitempty"`)) { |
There was a problem hiding this comment.
MEDIUM: Support detection greps a struct-tag substring in config.go, and managed-config-schema does not record the exception
checkJiraProjectMembersSupport fetches internal/config/config.go at the ref and checks bytes.Contains for yaml:"check_project_members,omitempty". A NotFound result is folded into "does not support". Several ordinary later refactors would make every newer ref look unsupported and block installs with a misleading "update the reference" error:
- moving the struct to another file
- dropping
omitempty - reformatting the tag
A comment that contains the literal would falsely pass. The sibling check uses a dedicated marker constant (jiraAuthorizationEnvMarker).
Also, internal/config/managed-config-schema says to bump the schema version whenever a per-repo config change is not readable by older releases. It records groups_from/accounts_from as the one exception. This PR adds a second such key without bumping the version or adding itself to that note.
Suggestion: Use a stable capability marker that exists to be checked, for example a line or constant in managed-config-schema, and check that marker instead of a struct tag. Alternatively, bump the managed schema version and gate the key on it. Either way, list check_project_members next to groups_from/accounts_from in the managed-config-schema exception comment.
Verified: read code at head (jira_poll.go 555-605, managed-config-schema) at b8060d6; raised by: Claude, DeepSeek
Summary
check_project_membersboolean to the Jira authorization provider. Omitting it or setting it totruepreserves the current policy.falseskips Jira role and group lookups and admits any Jira actor at the dispatch gate on GitHub and GitLab targets. Harness filters still apply, the poller leaves the actor role unresolved, and its existing bot/automation/self-event filter remains active.write,triage, orlabels, so actor restrictions cannot be silently ignored. Check pinned CLI and scaffold refs and remote user-owned GitHub poll workflow refs for parser support before installation writes configuration.Anyone who can produce a matching event in the polled Jira scope can start an agent when the setting is disabled. The polling credential no longer needs Administer Projects to read the role roster in this mode.
Current behavior at the base commit
roleSourceForselects the authorization source for each Jira event.authorizeEventapplies event exceptions and actor thresholds before harness matching.Verification
Added conflict validation, direct-struct validation, and both halves of the provider clone-isolation assertion.
Tested the dispatch gate and CEL matcher across comment, opened, label-added, and label-removed events; CEL filters still apply, and GitHub/GitLab authorization stays scoped.
Tested customer dispatch and continued filtering of Jira app actors during polling, plus bot and failed-verification actors at the dispatch gate.
Tested compatibility preflights for supported/old/missing refs, installed scaffolds, remote user-owned poll callers, missing clients and API failures, including rejection before secret/scaffold writes.
go test ./...passed.Focused race tests for the new configuration, matcher, gate, poll-cycle and install-preflight cases passed;
go vetfor affected packages passed.Staged
make lintpassed, including security scanning and Markdown links.Approximate changed-line production coverage: 96.4%; the new compatibility preflight function: 96.8%.
The broader race-and-coverage run hit Go's default 10-minute suite timeout in
internal/cliandinternal/reposwhile running unrelated tests; it did not complete. The timeouts were not increased.