DevOpsprompt onlyintermediate

Container Security Fixer

Automatically detects and remediates security vulnerabilities in container images through iterative scanning and patching workflows.

← all loops
devopssecuritycontainersci-cdvulnerability-management

Goal

Remove container vulnerabilities

How to Run

This loop will iteratively scan your container images for vulnerabilities, apply fixes, and verify resolution until the image is secure.

  1. 01

    Initialize the Loop

    Start the loop by providing access to your container definition files (e.g., Dockerfile, container config).

  2. 02

    Run Container Scan

    Execute the container scan command to detect existing vulnerabilities in the image.

  3. 03

    Analyze Results

    Review scan output to identify vulnerable packages, configurations, and dependencies.

  4. 04

    Apply Remediation

    Update container files with security patches, version upgrades, or configuration changes.

  5. 05

    Verify Fixes

    Rebuild container and re-scan to confirm vulnerabilities are resolved before exit.

Workflow Steps

  1. 01

    Scan the current container image for known vulnerabilities using the check command

  2. 02

    Parse scan results to categorize vulnerabilities by severity and type

  3. 03

    Generate targeted fixes such as package upgrades, base image updates, or config changes

  4. 04

    Apply fixes to container definition files and rebuild the image

  5. 05

    Rescan the updated image and compare results against exit condition

Kickoff Prompt

Start the "Container Security Fixer" loop.

Goal: Remove container vulnerabilities
Max iterations: 10
Between iterations run: container scan
Exit when: Scan clean


Scan this container image for vulnerabilities. Identify all critical and high-severity issues in the packages, configurations, and dependencies. For each vulnerability found, generate a fix that upgrades the affected component to a secure version without breaking the application. Apply the fixes to the container configuration, rebuild, and rescan until the image passes the security check with no remaining issues. Begin by running 'container scan' and analyzing the results.

Self-pace this loop. After each iteration, run `container scan` and evaluate the output, and only continue if the exit condition is not met (Scan clean). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.

Guardrails

hardcoded
  • ·Ensure all fix attempts maintain compatibility with the application's runtime requirements
  • ·Prioritize official package repositories and verified sources for security updates
  • ·Log each vulnerability fix attempt for audit trail purposes
  • ·Avoid breaking changes to existing application functionality during remediation
  • ·Do not hardcode secrets or credentials in any generated fixes

Flow Diagram

rendering…

Related loops — DevOps