用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill codeql命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. You MUST load this skill when dealing with Awesome GitHub Copilot.
Reference for name.com Core API documentation, API discovery, OpenAPI specs, and domain management workflows. You MUST load this skill when interacting with the name.com Core API.
Expert-level guide for using the Astro CLI to manage Astronomer projects, develop locally, interact with Airflow APIs, and manage cloud deployments. You MUST load this skill when asked to use the astro command.
基于 SOC 职业分类
正在显示 SKILL.md
| name | codeql |
| description | Configure and execute CodeQL code scanning analysis via GitHub Actions workflows and the CodeQL CLI. |
| license | MIT |
This skill provides procedural guidance for configuring and running CodeQL code scanning — both through GitHub Actions workflows and the standalone CodeQL CLI.
.github/workflows/codeql.yml).sbom skill).build-mode: autobuild for compiled languages with complex, non-standard build scripts, resulting in empty databases.security-events: write to the GitHub Actions job, causing the SARIF upload step to fail with HTTP 403..github/workflows/codeql.yml).push, pull_request, schedule, or merge_group workflow triggers.security-events: write and contents: read permissions.c-cpp, javascript-typescript, python).github/codeql-action/init@v4 specifying build-mode (none, autobuild, manual).github/codeql-action/analyze@v4 to perform analysis and upload SARIF results.name: "CodeQL Advanced"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
codeql database create codeql-db --language=javascript-typescript --source-root=srccodeql database create codeql-db --language=c-cpp --command="make build"codeql database analyze codeql-db javascript-code-scanning.qls --format=sarif-latest --output=results.sarifcodeql github upload-results --repository=owner/repo --ref=refs/heads/main --commit=<commit-sha> --sarif=results.sarifbuild-mode to manual and add explicit build commands.paths config, or use build-mode: none.security-events: write permission is granted.GITHUB_TOKEN is valid.| Problem | Solution |
|---|---|
| Workflow not triggering | Verify on: triggers match event; check paths/branches filters; ensure workflow exists on target branch |
Resource not accessible error | Add security-events: write and contents: read permissions |
| Autobuild failure | Switch to build-mode: manual and add explicit build commands |
| No source code seen | Verify --source-root, build command, and language identifier |
| C# compiler failure | Check for /p:EmitCompilerGeneratedFiles=true conflicts with .sqlproj or legacy projects |
| Fewer lines scanned than expected | Switch from none to autobuild/manual; verify build compiles all source |
| Kotlin in no-build mode | Disable and re-enable default setup to switch to autobuild |
| Cache miss every run | Verify dependency-caching: true on init action |
| Out of disk/memory | Use larger runners; reduce analysis scope via paths config; use build-mode: none |
| SARIF upload fails | Ensure token has security-events: write; check 10 MB file size limit |
| SARIF results exceed limits | Split across multiple uploads with different --sarif-category; reduce query scope |
| Two CodeQL workflows | Disable default setup if using advanced setup, or remove old workflow file |
| Slow analysis | Enable dependency caching; use --threads=0; reduce query suite scope |
security-extended or security-and-quality for comprehensive vulnerability coverage.dependency-caching: true on the init action to optimize run times.category parameter in the analyze step to separate component results.@v4) or commit SHAs for better security.autobuild for complex compiled language setups where a custom build is required.