Skip to content

fix(ci): use the correct needs.<job_id>.result context in scan-result - #660

Merged
pirog-spb merged 1 commit into
mainfrom
fix/security-scan-needs-context
Oct 5, 2026
Merged

pirog-spb merged 1 commit into
mainfrom
fix/security-scan-needs-context

Conversation

@pirog-spb

Copy link
Copy Markdown
Collaborator

needs.result['build-image'] (as well as the original dotted form) is not a valid context path: 'result' is a property inside each job object, not a map, so the expressions silently substituted empty strings and the scan-result aggregate failed on every run:

if [ "" != "success" ]; then ...; failed=1; fi

Use needs['<job_id>'].result (brackets required because of the hyphenated job ids, which would otherwise be parsed as subtraction).

needs.result['build-image'] (as well as the original dotted form) is
not a valid context path: 'result' is a property inside each job
object, not a map, so the expressions silently substituted empty
strings and the scan-result aggregate failed on every run:

  if [ "" != "success" ]; then ...; failed=1; fi

Use needs['<job_id>'].result (brackets required because of the
hyphenated job ids, which would otherwise be parsed as subtraction).

Signed-off-by: pirog-spb <[email protected]>
@pirog-spb
pirog-spb merged commit 48f257e into main Oct 5, 2026
12 checks passed
pirog-spb added a commit that referenced this pull request Oct 31, 2026
…#660)

Signed-off-by: pirog-spb <[email protected]>
(cherry picked from commit 48f257e)
Signed-off-by: pirog-spb <[email protected]>
pirog-spb added a commit that referenced this pull request Oct 31, 2026
…#660)

Signed-off-by: pirog-spb <[email protected]>
(cherry picked from commit 48f257e)
Signed-off-by: pirog-spb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant