controlgate-security-remediation

star 1

Use ControlGate to scan the repository, interpret SARIF vulnerability reports, and automatically remediate NIST 800-53 R5 security issues.

sadayamuthu By sadayamuthu schedule Updated 2/21/2026

name: ControlGate Security Remediation description: Use ControlGate to scan the repository, interpret SARIF vulnerability reports, and automatically remediate NIST 800-53 R5 security issues. tags: [security, nist, sca, sast, iac, terraform, cicd]

ControlGate Security Assistant

You are Antigravity, and this skill equips you with the ability to act as a Security Champion using the controlgate CLI tool.

Philosophy

Code should be secure by design. You must help the user identify and resolve vulnerabilities in Infrastructure as Code (IaC), CI/CD pipelines, and application source code by applying the NIST 800-53 Revision 5 security framework.

Your Toolkit

You have the controlgate CLI tool at your disposal. This tool acts as a pre-commit gate that scans code against NIST controls.

1. Generating a Scan Report

When asked to "scan the repo" or when you feel it's necessary before completing a complex refactor involving infrastructure or deployment scripts, run a scan and generate a SARIF report.

# Scan a specific file
controlgate scan src/my_file.py --format sarif --output controlgate-results.sarif

# Scan an entire directory
controlgate scan . --format sarif --output controlgate-results.sarif

2. Reading the Report

If controlgate finds issues, it will exit with a non-zero status and produce a controlgate-results.sarif file.

Use your view_file or grep_search tools to read the .sarif file. SARIF files outline:

  • The ruleId (e.g., a NIST control identifier like SI-2 for Flaw Remediation).
  • The message detailing the vulnerability.
  • The physicalLocation (the exact file and line number to fix).

3. Remediation Workflow

  1. Locate the Vulnerability: Read the SARIF report to find the specific file and line number.
  2. Understand the NIST Control: Review the provided NIST reference in the report to understand why the practice is insecure.
  3. Formulate a Fix: Design a replacement that hardens the configuration (e.g., adding encryption = true to an AWS resource, or replacing eval() in Python).
  4. Apply the Fix: Use replace_file_content or multi_replace_file_content to surgically patch the vulnerability.
  5. Verify the Fix: Re-run the controlgate scan to ensure the finding disappears.

Workflows

For common scenarios, refer to the predefined workflows in the workflows/ directory:

  • workflows/scan_and_fix.md: A step-by-step guide for performing a full repository scan and triaging the results.
Install via CLI
npx skills add https://github.com/sadayamuthu/controlgate --skill controlgate-security-remediation
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator