Skip to content

ci: fail the scheduled image scan again - #159

Merged
uniqueg merged 1 commit into
devfrom
ci/158-fail-scheduled-scan
Nov 16, 2026
Merged

uniqueg merged 1 commit into
devfrom
ci/158-fail-scheduled-scan

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

The scheduled scan of the released images (Scan, .github/workflows/scan.yml) fails again on critical and high vulnerabilities that have a fix, as CI, release.yml and tesk-api do:

  • Drop fail: "false" from the scan step and update the workflow's header comment.
  • Update the note on the scheduled scan in docs/development.md and remove the to-do to drop fail: "false".

0.12.0 republished latest through the release workflow on 2026-11-15. The scheduled run on 2026-11-16 (43811167413) left one medium alert per image in release-image-filer and release-image-taskmaster, and no critical or high alerts, so the scan passes with this change.

Closes #158

Verification

  • Open code scanning alerts checked: one medium each in release-image-filer and release-image-taskmaster, no critical or high.
  • actionlint runs in CI (Lint); it couldn't run locally (no actionlint version is set in mise).
  • CI: see the checks below.
  • The issue asks to check the first scheduled run after the change. That check is the next weekly run (Monday, 05:34 UTC), which the maintainers will do after the merge.

Light lane

This PR changes only CI configuration and docs. It touches no secrets, permissions or the release workflow, so I reviewed the diff myself.

🤖 Generated with Claude Code

Summary by Sourcery

Enforce failure reporting for fixable critical and high vulnerabilities in scheduled released-image scans.

Bug Fixes:

  • Make scheduled scans fail when released images contain fixable critical or high vulnerabilities.

CI:

  • Update the scheduled image-scan workflow to enforce vulnerability failures consistently with other CI scans.

Documentation:

  • Update development documentation to describe the scheduled scan's enforced vulnerability policy and remove the obsolete rollout note.

Drop fail: "false" from scan.yml now that 0.12.0 published latest
through the release workflow and its scan has no critical or high
findings. Update the header comment and the note in development.md.

Closes #158

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Re-enable failure on fixed critical and high vulnerabilities in the scheduled image scan, and update the workflow comment to describe the behavior.

  • .github/workflows/scan.yml L7-9, L51 (removed lines)

Documentation

Update the development guide to describe the scan's failure criteria and remove the obsolete instruction to re-enable failure.

  • docs/development.md L149-151, L224 (removed lines)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b78d5c9) to head (ee5b465).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #159   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         1799      1799           
=========================================
  Hits          1799      1799           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 16, 2026 05:49
@uniqueg
uniqueg merged commit d640861 into dev Nov 16, 2026
32 checks passed
@uniqueg
uniqueg deleted the ci/158-fail-scheduled-scan branch November 16, 2026 05:50
@sourcery-ai

sourcery-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Linked issues

Checked at commit ee5b465

#158 ci: fail the scheduled image scan again · 2 of 3 met · 1 to check by hand

# Requirement Status Notes
1 Make scan.yml fail on fixable critical and high findings ✅ Met The scan step no longer sets fail: "false".
2 Remove or update the matching note in docs/development.md ✅ Met The note now describes the failure conditions and accepted findings.
3 Check or manually trigger the first scheduled run after the change 👀 Check by hand (external system) After the change is merged, a maintainer must check the next scheduled run or trigger one manually.

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/scan.yml" line_range="54" />
<code_context>
           image: docker.io/${{ vars.DOCKERHUB_ORG || 'elixircloud' }}/tesk-core-${{ matrix.image }}:latest
           category: release-image-${{ matrix.image }}
           report: "true"
-          fail: "false"
</code_context>
<issue_to_address>
**Scheduled scan fails on stale image**

When a scheduled or manually dispatched scan overlaps a release retag, and the old image has a fixable critical or high finding cleared by that release, a matrix job can pull the old `:latest` digest just before the release retags it, then fail on a fixable critical or high finding even though the release has scanned the new digest and is publishing it. The scheduled run reports a failure for a vulnerability no longer present in the released image.

Retry or defer enforcement when `latest` changes during a scan, so the job evaluates the currently published digest.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: .github/workflows/scan.yml:54


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

image: docker.io/${{ vars.DOCKERHUB_ORG || 'elixircloud' }}/tesk-core-${{ matrix.image }}:latest
category: release-image-${{ matrix.image }}
report: "true"
fail: "false"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Scheduled scan fails on stale image

When a scheduled or manually dispatched scan overlaps a release retag, and the old image has a fixable critical or high finding cleared by that release, a matrix job can pull the old :latest digest just before the release retags it, then fail on a fixable critical or high finding even though the release has scanned the new digest and is publishing it. The scheduled run reports a failure for a vulnerability no longer present in the released image.

Retry or defer enforcement when latest changes during a scan, so the job evaluates the currently published digest.

Prompt for AI agents
In `.github/workflows/scan.yml` at line 54:

**Scheduled scan fails on stale image**

When a scheduled or manually dispatched scan overlaps a release retag, and the old image has a fixable critical or high finding cleared by that release, a matrix job can pull the old `:latest` digest just before the release retags it, then fail on a fixable critical or high finding even though the release has scanned the new digest and is publishing it. The scheduled run reports a failure for a vulnerability no longer present in the released image.

Retry or defer enforcement when `latest` changes during a scan, so the job evaluates the currently published digest.

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.

ci: fail the scheduled image scan again

1 participant