Pre-Merge Pack: Security, CI Hardening and Test Gaps

    1

    Automated security, CI/CD hardening, and test-gap audit with a unified merge-readiness report.

    $24

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Pre-Merge Pack: Security, CI Hardening and Test Gaps

    Example session with this skill installed

    Run the pre-merge pack on this branch against origin/main. I've added a new API endpoint in Python and updated the Dockerfile.

    • Read your context and instructions
    • Compiled the pre-merge

    I have completed the pre-merge audit for the current branch against origin/main. I scanned the diff for security flaws, audited the updated Dockerfile, and checked for test gaps in the new Python logic.

    Pre-merge Report

    Verdict: FIX

    Security review: 1 finding (0 critical / 1 high / 0 medium / 0 low)
    CI and Docker: 2 findings
    Test gaps: 1 changed function with no test

    Top 4 actions, most urgent first:

    1. [High] app/routes.py:84: User-provided file_id is used directly in a file path string.
      Fix: Sanitize the input using os.path.basename() or validate against an allowlist before file access.
    2. [Medium] Dockerfile:2: Base image python:3.12-slim uses a moving tag.
      Fix: Pin to a digest: FROM python:3.12-slim@sha256:778667527632...
    3. [Low] Dockerfile: No USER instruction found; container runs as root.
      Fix: Create a non-root user and add USER app before the CMD.
    4. [Gap] app/logic.py:112: Function calculate_tax_rate is modified but not mentioned in tests/.
      Fix: Add a test case in tests/test_logic.py covering positive, zero, and negative inputs.

    Next steps

    • Review and apply the path sanitization fix in app/routes.py.
    • Run ci-docker-hardening to automatically pin the Docker base image and add a non-root user.
    • Generate the missing test for calculate_tax_rate using the pytest-gap-filler tool.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Merge requests often introduce security regressions, infrastructure misconfigurations, and untested logic. Manual review is slow and error-prone. This skill automates a three-tier pre-merge audit to ensure every pull request meets security and quality standards before it hits main.

    What it does

    • Security Diff Analysis: Scans code changes for hardcoded secrets, injection vulnerabilities, auth gaps, and weak cryptography.
    • Infrastructure Hardening: Audits Dockerfiles and GitHub Actions workflows for root execution, unpinned images, and excessive permissions.
    • Test Gap Detection: Identifies new or modified Python functions that lack corresponding pytest coverage.
    • Unified Reporting: Consolidates findings into a single report with a clear verdict: BLOCK, FIX, or SHIP.
    • Automated Fixes: Proposes and applies remediations for CI/CD flaws, such as pinning actions to commit SHAs or adding non-root users.

    How it works

    1. Scope definition: The agent identifies the base branch and analyzes the diff between the feature branch and origin/main.
    2. Multi-layer scanning: It executes specialized audits for code security, CI/CD configuration, and test coverage based on the file types modified.
    3. Verification: The agent verifies script-generated leads by reading the surrounding code context to eliminate false positives.
    4. Reporting: It generates a prioritized action list, ranking findings from Critical to Low with specific file paths and line numbers.

    Frameworks & tools

    The skill utilizes Python-based scanning scripts, pytest for test execution, and ecosystem-specific audit tools like npm audit or pip-audit. It interacts directly with git, Dockerfiles, and GitHub Actions YAML configurations.

    Why this beats prompting it yourself

    Generic prompts often miss supply-chain risks in workflows or fail to trace user input across files. This skill follows a structured multi-step protocol that combines pattern-matching scripts with contextual code analysis, ensuring secrets are masked and verdicts are based on objective risk rules.

    Use cases

    • Pre-commit audits: Running a final check on a local branch before pushing to a remote repository.
    • PR gatekeeping: Generating a security and coverage summary for a technical lead to review before merging.
    • Legacy cleanup: Hardening old Dockerfiles and CI pipelines that were never pinned to specific versions.
    • Coverage enforcement: Ensuring new business logic in Python modules is backed by edge-case tests.

    Known limitations

    The test gap analysis is name-based and specifically targets Python environments. Infrastructure audits are limited to Docker and GitHub Actions. Git history is required for diff analysis.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    Requires Git history and a Python environment. Test gap detection is name-based and limited to Python. Infrastructure audits cover Docker and GitHub Actions only.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Software
    Git

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files
    Listedtoday

    What's inside

    Frequently Asked Questions

    It automates a three-tier audit of your code changes, identifying security vulnerabilities, infrastructure misconfigurations in Docker/GitHub Actions, and untested Python logic before you merge to your main branch.

    The skill is designed for Python-based environments and currently supports security audits for general code, infrastructure hardening for Docker and GitHub Actions, and test gap analysis specifically for pytest.

    Unlike generic prompts, this skill uses a structured protocol that combines pattern-matching scripts with contextual verification to minimize false positives and catch supply-chain risks that LLMs often overlook.

    Each report provides a clear verdict (BLOCK, FIX, or SHIP) and includes prioritized findings with specific line numbers, plus automated suggestions for fixing CI/CD flaws like unpinned action versions.

    The package includes the core auditing logic, integration scripts for git and Docker, and documentation for local pre-commit or server-side PR gatekeeping setups.

    New in Code Quality & Review