用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/personamanagmentlayer/pcl --skill codeql-expert命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Expert in Persona Control Language (PCL) - language design, compiler architecture, runtime systems, and ecosystem development
Expert system for designing, creating, and validating PCL skills with comprehensive domain knowledge extraction
Expert-level Docker containerization, image optimization, and container orchestration. Use this skill for building efficient Docker images, managing containers, and implementing Docker best practices.
基于 SOC 职业分类
正在显示 SKILL.md
| name | codeql-expert |
| version | 1.0.0 |
| description | Expert-level CodeQL for static analysis, vulnerability detection, and security code scanning |
| category | security |
| tags | ["codeql","static-analysis","sast","vulnerability-detection","github-security"] |
| allowed-tools | ["Read","Write","Edit","Bash(codeql:*, gh:*)"] |
Expert guidance for CodeQL static analysis, custom query development, vulnerability detection, and integration with CI/CD pipelines.
# Download CodeQL CLI
wget https://github.com/github/codeql-cli-binaries/releases/latest/download/codeql-linux64.zip
unzip codeql-linux64.zip
export PATH="$PATH:/path/to/codeql"
# Clone CodeQL queries
git clone https://github.com/github/codeql.git codeql-repo
# Verify
codeql --version
# JavaScript/TypeScript
codeql database create my-js-db --language=javascript
# Java (requires build)
codeql database create my-java-db \
--language=java \
--command="mvn clean package"
# Python
codeql database create my-python-db --language=python
# Multiple languages
codeql database create my-db --db-cluster --language=javascript,python
/**
* @name SQL Injection
* @description Detects SQL injection vulnerabilities
* @kind path-problem
* @problem.severity error
* @security-severity 9.8
* @precision high
* @id js/sql-injection
* @tags security external/cwe/cwe-089
*/
import javascript
import semmle.javascript.security.dataflow.SqlInjectionQuery
import DataFlow::PathGraph
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink,
"SQL query depends on $@.", source.getNode(), "user input"
/**
* @name Cross-site scripting
* @kind path-problem
*/
import javascript
import semmle.javascript.security.dataflow.DomBasedXssQuery
import DataFlow::PathGraph
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink,
"XSS vulnerability due to $@.", source.getNode(), "user input"
/**
* @name Hardcoded credentials
* @kind problem
*/
import javascript
from StringLiteral str, Variable v
where
v.getAnAssignedExpr() = str and
(
v.getName().toLowerCase().matches("%password%") or
v.getName().toLowerCase().matches("%apikey%") or
v.getName().toLowerCase().matches("%secret%")
) and
str.getValue().length() > 8 and
not str.getValue().matches("TODO%")
select str, "Hardcoded credential: " + v.getName()
/**
* @name Custom taint tracking
*/
import javascript
import semmle.javascript.dataflow.DataFlow
class CustomTaintTracking extends TaintTracking::Configuration {
CustomTaintTracking() { this = "CustomTaintTracking" }
override predicate isSource(DataFlow::Node source) {
source instanceof RemoteFlowSource
}
override predicate isSink(DataFlow::Node sink) {
exists(CallExpr call |
call.getCalleeName() in ["exec", "eval", "system"]
|
sink.asExpr() = call.getAnArgument()
)
}
override predicate isSanitizer(DataFlow::Node node) {
node = DataFlow::BarrierGuard<StringOps::Validation>::getABarrierNode()
}
}
from CustomTaintTracking cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink,
"Dangerous operation with $@.", source.getNode(), "user input"
# Analyze database
codeql database analyze my-db \
--format=sarif-latest \
--output=results.sarif \
codeql/javascript-queries:codeql-suites/javascript-security-extended.qls
# Run custom query
codeql query run my-query.ql --database=my-db --output=results.bqrs
# Convert to CSV
codeql bqrs decode results.bqrs --format=csv --output=results.csv
name: CodeQL Analysis
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
analyze:
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
matrix:
language: ['javascript', 'python']
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2