TT-16030: run the jira-linter from the published image - #163
Conversation
PR #162 carried this change but merged into its stacked base branch rather than main, so main never received it. main currently holds go.mod requiring go 1.26 from #155, alongside an action.yaml that pins setup-go to 1.24.7. setup-go sets GOTOOLCHAIN=local, so `go install` fails with: go: go.mod requires go >= 1.26 (running go 1.24.7; GOTOOLCHAIN=local) Every repository on @production is failing its Jira check as a result. This replaces the two build steps with a single `docker run` against the image published to ECR, so the action stops installing a Go toolchain and compiling on every run. The image lives in a private registry, which rules out a Docker container action, so the action stays composite and gains two steps that assume ecr_rw_tyk and log in to ECR. Everything after the linter step is unchanged: branch resolution, the stderr capture, the failure comment body, both sticky comment steps, and the final exit. ci-test.yml moves to Go 1.26 to match go.mod. Variables reach the container by name rather than by value, so no secret appears in the command line or the run log.
zizmor findings
Full details are in the workflow run. |
|
This PR refactors the Files Changed Analysis
Architecture & Impact Assessment
The new authentication and execution flow is as follows: sequenceDiagram
participant Runner as GitHub Runner
participant OIDC as GitHub OIDC Provider
participant AWS_STS as AWS STS
participant ECR as Amazon ECR
participant Container as Jira Linter Container
Runner->>OIDC: Request JWT (id-token)
OIDC-->>Runner: Provide JWT
Runner->>AWS_STS: AssumeRoleWithWebIdentity(Role: ecr_rw_tyk, JWT)
AWS_STS-->>Runner: Provide Temporary AWS Credentials
Runner->>ECR: Login with AWS Credentials
ECR-->>Runner: Login Succeeded
Runner->>ECR: Pull jira-linter image
ECR-->>Runner: Provide image
Runner->>Container: docker run jira-linter:latest
Container-->>Runner: Linter output (stdout/stderr)
Scope Discovery & Context ExpansionThe impact of this change extends beyond this repository to all projects that use the Metadata
Powered by Visor from Probelabs Last updated: 2026-09-17T12:27:00.165Z | Triggered by: pr_opened | Commit: dac93d7 💡 TIP: You can chat with Visor using |
Security Issues (3)
Architecture Issues (2)
Performance Issues (1)
Powered by Visor from Probelabs Last updated: 2026-09-17T12:26:57.883Z | Triggered by: pr_opened | Commit: dac93d7 💡 TIP: You can chat with Visor using |
The jira-linter action now runs from a container image in a private ECR registry instead of compiling with `setup-go`. Pulling it means assuming `ecr_rw_tyk` via OIDC, and GitHub only mints an OIDC token for a job that requests one. Without `id-token: write` the ECR login fails and the Jira check never runs. `pull-requests: write` and `contents: read` are listed explicitly because naming any permission resets the rest to `none`. Merge before [github-actions#163](TykTechnologies/github-actions#163) is promoted to `production`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!---TykTechnologies/jira-linter starts here--> ### Ticket Details <details> <summary> <a href="https://tyktech.atlassian.net/browse/TT-16030" title="TT-16030" target="_blank">TT-16030</a> </summary> | | | |---------|----| | Status | In Code Review | | Summary | Optimize the jira-linter action to enhance its efficiency | Generated at: 2026-09-17 14:05:16 </details> <!---TykTechnologies/jira-linter ends here-->
Replaces
setup-go+go installwith a singledocker runagainst the image published to ECR.#162 carried this change but merged into its stacked base branch instead of
main, somainnever got it.mainandproductionare broken right now. #155 bumpedgo.modtogo 1.26and leftaction.yamlpinningsetup-goto1.24.7.setup-gosetsGOTOOLCHAIN=local, so every consumer on@productionfails with:jira-linter/action.yamldocker run, plus two ECR login steps.github/workflows/ci-test.ymlgo.mod.github/workflows/jira-lint.yamlid-token: writedocs/workflows/jira-lint.mdEverything after the linter step is unchanged. The action stays composite because a private ECR image rules out
using: docker.Verified against the live Jira API: role assumption, ECR login, image pull, and container run all succeeded in 18s.
Before promoting
production, consumers needid-token: writeon the calling job or they break on the ECR login. tyk-operator-internal#252 does this;tykstill needs it.🤖 Generated with Claude Code