---
name: fixing-github-security-alerts
description: >-
  Remediate GitHub security / Dependabot / CodeQL / code-quality alerts via fix_github_security_alert
metadata:
  owner: Vaibhav
  last_changed_by: Jan
  last_changed_at: 2026-09-12
  usecases:
    - For repository maintainers remediating Dependabot, CodeQL, or code-quality alerts.
    - For users requesting a fix from an exact security alert or repository security page.
  requires:
    - GitHub authentication with repository write access and security-events read access.
    - An installed and authenticated coding agent.
    - The fix_github_security_alert tool and its supported local execution environment.
  version: '1.0'
title: fixing-github-security-alerts
canonical_url: https://skilld.dev/gh/tracer-cloud/opensre/fixing-github-security-alerts
last_updated: 2026-11-20T14:16:11.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install tracer-cloud/opensre/fixing-github-security-alerts`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/fixing-github-security-alerts`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/tracer-cloud/opensre/fixing-github-security-alerts) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/fixing-github-security-alerts`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/fixing-github-security-alerts --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/fixing-github-security-alerts --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# GitHub security and quality fix

Use `fix_github_security_alert` to remediate a supported security or quality
finding, producing a local diff or a pull request as requested.

## When to use

- The user asks to fix/remediate GitHub security and quality issues, security
  alerts, Security and quality findings, Code Quality findings, Dependabot
  alerts, CodeQL/code-scanning alerts, vulnerable dependencies, or repo
  security issues.
- The user says "hey fix the security issues", "fix the security issues in
  owner/repo", "fix the security and quality issues", or "fix the opensre repo
  security issues and raise a PR".
- A GitHub security alert URL, `/security/code-scanning` page URL, or
  `/security/quality` URL is provided.

## Scope

Use other workflows for these requests:

- Ordinary GitHub issue/PR create, close, comment, assign, label, merge, or repo
  reads. Use `github_cli`.
- Secret-scanning remediation. The tool will refuse it because the secret must
  be revoked/rotated outside the repo before code cleanup.

## Workflow rules

- For broad repo requests, call:
  `fix_github_security_alert(owner?, repo?, alert_type="auto", open_pr=<user asked PR>)`
  and let the tool select one open supported security or quality finding.
- If no owner/repo is named, omit both and let the tool use the current
  checkout's GitHub origin.
- If the user supplies an alert URL, `/security/code-scanning` page URL, or
  `/security/quality` URL, pass it as
  `alert_url`.
- If they name a Dependabot alert, code-scanning alert, CodeQL alert, or Code
  Quality finding number, pass `alert_type` and `alert_number`.
- Use `alert_type="code_quality"` for GitHub `/security/quality` standard
  findings such as unused import, empty except, unreachable code, or mixed
  returns.
- Use `alert_type="code_scanning"` for GitHub `/security/code-scanning` pages
  or broad CodeQL/code-scanning requests.
- Set `open_pr=true` only when they ask to open/raise/create a PR or "ship" the
  fix; otherwise leave it false for a local diff.
- Never use `github_cli` to run a raw `gh` workflow around this. The fixer owns
  alert context, fix execution, branch safety, and PR creation.
- The tool runs one alert per call. Do not loop over multiple alerts unless the
  user explicitly asks to continue after the first result.
- The tool fixes findings itself: built-in fixers first, then an auto-detected
  coding agent CLI (no configuration needed). Never add coding-agent advice,
  CLI names, or install commands beyond what the tool's `error` text already
  says, and never make an external agent the user's next step.
- If the tool returns `response_text`, output exactly that text and stop.
- If the tool reports no automatic patch, reply in one short line from `error`.
  Do not say "next steps", do not add numbered options, do not list example
  commands, and do not ask a broad follow-up question.
- After the tool returns, reply briefly from the result: finding type/number,
  changed files, and PR URL if present. If `error_kind` is set, explain the
  required next step from `error`.

## Examples

- "fix the security issues in Tracer-Cloud/opensre and raise a PR"

  ```text
  fix_github_security_alert(owner="Tracer-Cloud", repo="opensre", alert_type="auto", open_pr=true)
  ```

- "hey fix the security issues"

  ```text
  fix_github_security_alert(alert_type="auto")
  ```

- "fix the code quality findings on https://github.com/Tracer-Cloud/opensre/security/quality"

  ```text
  fix_github_security_alert(alert_url="https://github.com/Tracer-Cloud/opensre/security/quality", alert_type="code_quality")
  ```

- "fix Dependabot alert 12 in this repo"

  ```text
  fix_github_security_alert(alert_type="dependabot", alert_number=12)
  ```

- "fix https://github.com/acme/app/security/code-scanning/7 and open a PR"

  ```text
  fix_github_security_alert(alert_url="https://github.com/acme/app/security/code-scanning/7", open_pr=true)
  ```

- "fix the code scanning errors on https://github.com/Tracer-Cloud/opensre/security/code-scanning and raise a PR"

  ```text
  fix_github_security_alert(alert_url="https://github.com/Tracer-Cloud/opensre/security/code-scanning", alert_type="code_scanning", open_pr=true)
  ```
