- Home
- Skills
- Code Quality & Review
- Pre-Merge Pack: Security, CI Hardening and Test Gaps
Pre-Merge Pack: Security, CI Hardening and Test Gaps
Automated security, CI/CD hardening, and test-gap audit with a unified merge-readiness report.
$24
Works with the AI Agents you already use
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:
- [High]
app/routes.py:84: User-providedfile_idis used directly in a file path string.
Fix: Sanitize the input usingos.path.basename()or validate against an allowlist before file access. - [Medium]
Dockerfile:2: Base imagepython:3.12-slimuses a moving tag.
Fix: Pin to a digest:FROM python:3.12-slim@sha256:778667527632... - [Low]
Dockerfile: NoUSERinstruction found; container runs as root.
Fix: Create a non-root user and addUSER appbefore theCMD. - [Gap]
app/logic.py:112: Functioncalculate_tax_rateis modified but not mentioned intests/.
Fix: Add a test case intests/test_logic.pycovering positive, zero, and negative inputs.
Next steps
- Review and apply the path sanitization fix in
app/routes.py. - Run
ci-docker-hardeningto automatically pin the Docker base image and add a non-root user. - Generate the missing test for
calculate_tax_rateusing thepytest-gap-fillertool.
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
- Scope definition: The agent identifies the base branch and analyzes the diff between the feature branch and origin/main.
- Multi-layer scanning: It executes specialized audits for code security, CI/CD configuration, and test coverage based on the file types modified.
- Verification: The agent verifies script-generated leads by reading the surrounding code context to eliminate false positives.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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