You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ops(github): the op-pipeline generator cannot express OIDC, since it emits no uses: steps and no permissions beyond the finding mode's #2242
Reported by the choudoufu side while wiring the first GitHub-first pipeline over a chant terraform Op against a real AWS account. Verified on main at ee69dba.
lexicons/github/src/components/generate-op-pipeline.ts builds one job whose steps are actions/checkout@v4, one run: line per beforeScript entry, chant run <op>, and one run: per extraScript entry (lines 202-205). permissions: is permissionsFor(findingMode, trigger) (line 213) and nothing can add to it. So aws-actions/configure-aws-credentials with id-token: write, the one proven AWS auth path in this org, cannot be generated. Static credentials through the variables env mapping can, which is the wrong default to ship.
The forgejo dialect reuses this generator and ignores permissions:; gitlab has no uses: concept at all, so the option shape has to degrade by name there.
Proposed
A setup (or steps) option on the scheduled Op spec that takes a list of { uses, with?, env? } and { run } entries emitted between checkout and beforeScript, and an additive permissions option merged over the mode's least-privilege set, never replacing it, with id-token: write as the motivating value. The github dialect emits both; forgejo emits the steps and drops the permissions as it does today; gitlab refuses uses entries by name at build time. The plan-on-pr example gains the OIDC form as its documented AWS auth, with the role ARN read from a repository variable.
Acceptance
A scheduled Op spec with a uses: aws-actions/configure-aws-credentials@v4 setup step and permissions: { id-token: write } generates a job whose steps are checkout, that action with its with:, the terraform install, chant run, and whose permissions: is the mode's set plus id-token: write.
A spec whose additive permissions try to widen something the mode already grants, or grant write-all, is refused at build time.
gitlab refuses a uses entry by name; forgejo emits the step.
lexicons/terraform/examples/plan-on-pr documents OIDC as the AWS auth path and examples.test.ts asserts the generated steps and permissions.
Prior art checked before filing: nothing covers this. #2084 added the pull_request and push triggers to this generator without touching steps or permissions; #891 built the component pipeline generator with the same checkout-plus-run shape; #298 scoped OIDC for the gitlab lexicon's own CI_JOB_TOKEN, a different surface. The generator has never emitted a uses: step other than checkout.
Activity
lex00 commentedon Sep 7, 2026
Prior art checked before filing: nothing covers this. #2084 added the pull_request and push triggers to this generator without touching steps or permissions; #891 built the component pipeline generator with the same checkout-plus-run shape; #298 scoped OIDC for the gitlab lexicon's own CI_JOB_TOKEN, a different surface. The generator has never emitted a
uses:step other than checkout.feat(ops): a `setup` step list and additive `permissions` on a schedu…
feat(ops): an `environment` option on a scheduled Op, so a deployment…
feat(gitlab): the merge_request and push triggers on the op-pipeline …
docs(terraform): plan-on-pr gains a gitlab generation beside its gith…
feat(gitlab): the merge_request and push triggers on the op-pipeline …
docs(terraform): plan-on-pr gains a gitlab generation beside its gith…
feat(gitlab): the merge_request and push triggers on the op-pipeline …
docs(terraform): plan-on-pr gains a gitlab generation beside its gith…
gitlab: pull_request and push triggers on the op-pipeline generator, …
refactor(gitlab)!: the Op pipeline's stage and file are named "ops", …