Loading...
Loading...
Compare original and translation side by side
audit/<YYYY-MM-DD>/report.mdaudit/<YYYY-MM-DD>/report.md<project root>/audit/<YYYY-MM-DD>/report.md.gitignore.env*audit/npm auditpip-audit<项目根目录>/audit/<YYYY-MM-DD>/report.md.gitignore.env*audit/npm auditpip-auditundefinedundefined
Also check for telltale project files:
```bash
同时检查标志性项目文件:
```bash
Use Glob to look for any of: `package.json`, `pyproject.toml`, `requirements.txt`, `go.mod`, `pom.xml`, `build.gradle`, `Gemfile`, `Cargo.toml`, `composer.json`, `*.csproj`, `*.sln`, `Dockerfile`, `*.tf`.
**If populated:** skip to Step 1.
**If blank:** ask the user for a GitHub URL. Then clone:
```bash
gh repo clone <url> . # preferred — uses gh auth
使用Glob查找以下任意文件:`package.json`、`pyproject.toml`、`requirements.txt`、`go.mod`、`pom.xml`、`build.gradle`、`Gemfile`、`Cargo.toml`、`composer.json`、`*.csproj`、`*.sln`、`Dockerfile`、`*.tf`。
**若目录非空**:跳至步骤1。
**若目录为空**:向用户索要GitHub URL,然后克隆项目:
```bash
gh repo clone <url> . # 优先使用——借助gh认证
Re-run the populated check and proceed to Step 1. If both clone commands fail, stop and report the error verbatim; do not improvise.
重新执行非空检查后进入步骤1。若两种克隆命令均失败,则停止操作并如实报告错误;不得自行变通。| Signal | Detect via | What it tells you |
|---|---|---|
| Read | Node/JS; check |
| Read | Python; check for django/flask/fastapi |
| Read | Go; framework is in imports (gin/echo/fiber/chi) |
| Read | Java/Kotlin; spring-boot/quarkus |
| Read | Ruby; rails/sinatra |
| Read | Rust; actix-web/axum/rocket |
| Read | PHP; laravel/symfony |
| Glob+Read | .NET; aspnetcore version |
| Read | Runtime base images; exposed ports; build steps |
| Glob+Read | CI/CD posture for A03/A08 |
| Glob | IaC for A02 misconfig |
| Glob | Configuration surface, secret leak risk |
| 信号 | 检测方式 | 说明 |
|---|---|---|
| 读取文件 | Node/JS技术栈;检查 |
| 读取文件 | Python技术栈;检查django/flask/fastapi等框架 |
| 读取文件 | Go技术栈;从导入语句中识别框架(gin/echo/fiber/chi) |
| 读取文件 | Java/Kotlin技术栈;spring-boot/quarkus等框架 |
| 读取文件 | Ruby技术栈;rails/sinatra等框架 |
| 读取文件 | Rust技术栈;actix-web/axum/rocket等框架 |
| 读取文件 | PHP技术栈;laravel/symfony等框架 |
| 匹配+读取 | .NET技术栈;aspnetcore版本 |
| 读取文件 | 运行时基础镜像;暴露端口;构建步骤 |
| 匹配+读取 | 用于A03/A08类问题的CI/CD配置检查 |
| 匹配 | 用于A02类配置错误的IaC(基础设施即代码)检查 |
| 匹配 | 配置面、密钥泄露风险检查 |
app\.(get|post|put|delete|patch)\s*\(authenticateauthorizerequireAuthfindByPk\(req\.(params|body|query)\.id\)WHERE id\s*=\s*\$\{req\.bodyUser.create({...req.body})User.update(req.body)path.joinfs.readopen(..Access-Control-Allow-Origin:\s*\*Access-Control-Allow-Credentials:\s*truealg: none/admin/debug/internal/__For full guidance (description, prevention, attack scenarios, mapped CWEs), readbefore recommending fixes.references/A01_2025-Broken_Access_Control.md
app\.(get|post|put|delete|patch)\s*\(authenticateauthorizerequireAuthfindByPk\(req\.(params|body|query)\.id\)WHERE id\s*=\s*\$\{req\.bodyUser.create({...req.body})User.update(req.body)path.joinfs.readopen(..Access-Control-Allow-Origin:\s*\*Access-Control-Allow-Credentials:\s*truealg: none/admin/debug/internal/__如需完整指导(描述、预防方案、攻击场景、对应CWE),在推荐修复方案前请阅读。references/A01_2025-Broken_Access_Control.md
DEBUG\s*=\s*Trueapp.debug = TrueNODE_ENVadmin:adminroot:rootpassword=changemehelmet()Strict-Transport-SecurityContent-Security-PolicyX-Content-Type-OptionsReferrer-PolicyPermissions-Policyacl: public-readBucketAccessControl.PUBLIC_READiam.PublicAccessPrevention: inheritedFROM .*:latestUSER rootapt-get install--no-install-recommendsrm -rf /var/lib/apt/lists/*0.0.0.0:0.0.0.0/0/swagger/api-docs/graphqlFor full guidance, read.references/A02_2025-Security_Misconfiguration.md
DEBUG\s*=\s*Trueapp.debug = TrueNODE_ENVadmin:adminroot:rootpassword=changemehelmet()Strict-Transport-SecurityContent-Security-PolicyX-Content-Type-OptionsReferrer-PolicyPermissions-Policyacl: public-readBucketAccessControl.PUBLIC_READiam.PublicAccessPrevention: inheritedFROM .*:latestUSER rootapt-get install--no-install-recommendsrm -rf /var/lib/apt/lists/*0.0.0.0:0.0.0.0/0/swagger/api-docs/graphql如需完整指导,请阅读。references/A02_2025-Security_Misconfiguration.md
package-lock.jsonyarn.lockpnpm-lock.yamlpoetry.lockPipfile.lockgo.sumGemfile.lockCargo.locknpm audit --jsonpip-audit -f jsonbundle auditcargo auditgovulncheck ./...osv-scanner -r .uses:\s*[\w/-]+@v?\d+uses:\s*[\w/-]+@[0-9a-f]{40}.npmrcpip.conf.cargo/config.tomlcurl ... | shraw.githubusercontent.comgist.github.comsbom.jsonbom.xml*.cdx.json*.spdx.jsonFor full guidance, read.references/A03_2025-Software_Supply_Chain_Failures.md
package-lock.jsonyarn.lockpnpm-lock.yamlpoetry.lockPipfile.lockgo.sumGemfile.lockCargo.locknpm audit --jsonpip-audit -f jsonbundle auditcargo auditgovulncheck ./...osv-scanner -r .uses:\s*[\w/-]+@v?\d+uses:\s*[\w/-]+@[0-9a-f]{40}.npmrcpip.conf.cargo/config.tomlcurl ... | shraw.githubusercontent.comgist.github.comsbom.jsonbom.xml*.cdx.json*.spdx.json如需完整指导,请阅读。references/A03_2025-Software_Supply_Chain_Failures.md
\b(md5|sha1)\bcrypto.createHash\(['"](md5|sha1)['"]\)hashlib\.(md5|sha1)\(\b(DES|3DES|RC4|ECB)\bCipher\.getInstance\(['"](DES|RC4|.*ECB)['"]\)crypto.createCipher\(Math\.random\(\)rand\(\)random\.random\(\)new Random\(\)rejectUnauthorized:\s*falseverify=FalseInsecureSkipVerify:\s*trueServicePointManager\.ServerCertificateValidationCallback(?i)(secret|key|password|token|api[_-]?key)\s*[:=]\s*['"][^'"]{8,}['"]http://TLSv1\bSSLv3:RC4::NULL:bcryptscryptargon2pbkdf2createCipheriv\('aes-...-gcm', key, iv)ivFor full guidance, read.references/A04_2025-Cryptographic_Failures.md
\b(md5|sha1)\bcrypto.createHash\(['"](md5|sha1)['"]\)hashlib\.(md5|sha1)\(\b(DES|3DES|RC4|ECB)\bCipher\.getInstance\(['"](DES|RC4|.*ECB)['"]\)crypto.createCipher\(Math\.random\(\)rand\(\)random\.random\(\)new Random\(\)rejectUnauthorized:\s*falseverify=FalseInsecureSkipVerify:\s*trueServicePointManager\.ServerCertificateValidationCallback(?i)(secret|key|password|token|api[_-]?key)\s*[:=]\s*['"][^'"]{8,}['"]http://TLSv1\bSSLv3:RC4::NULL:bcryptscryptargon2pbkdf2createCipheriv\('aes-...-gcm', key, iv)iv如需完整指导,请阅读。references/A04_2025-Cryptographic_Failures.md
(query|execute|raw)\s*\(\s*['"\, , , sequelize\.literal\(Sequelize\.QueryTypes\.RAWModel\.findAll\(\{\s*where:\s*\[db\.execute\("req\.body\.\w+findfindOnewhere:\s*\{[^}]*\$neexec\(execSync\(spawn\(.*,\s*{\s*shell:\s*trueos.system\(subprocess\..*shell=TrueRuntime\.execdangerouslySetInnerHTMLv-html\|safeElement\.innerHTML\s*=document\.write\({!! !!}<%== %>Template\(.*\+render_template_string\(eval\(.*req\.eval\(new Function\(setTimeout\(stringvm\.runInNewContext\(For full guidance, read.references/A05_2025-Injection.md
(query|execute|raw)\s*\(\s*['"\、、、sequelize\.literal\(Sequelize\.QueryTypes\.RAWModel\.findAll\(\{\s*where:\s*\[db\.execute\("req\.body\.\w+findfindOnewhere:\s*\{[^}]*\$neexec\(execSync\(spawn\(.*,\s*{\s*shell:\s*trueos.system\(subprocess\..*shell=TrueRuntime\.execdangerouslySetInnerHTMLv-html\|safeElement\.innerHTML\s*=document\.write\({!! !!}<%== %>Template\(.*\+render_template_string\(eval\(.*req\.eval\(new Function\(setTimeout\(stringvm\.runInNewContext\(如需完整指导,请阅读。references/A05_2025-Injection.md
express-rate-limitflask-limiterdjango-ratelimit/order/confirmreq.body.totalreq.body.rolereq.body.discountModel.findAll()SELECT * FROM tableWHERE tenant_id =axios.get(req.body.url)fetch(userInput)should_reject_unauthenticated_forbidden_denies_For full guidance, read.references/A06_2025-Insecure_Design.md
express-rate-limitflask-limiterdjango-ratelimit/order/confirmreq.body.totalreq.body.rolereq.body.discountModel.findAll()SELECT * FROM tableWHERE tenant_id =axios.get(req.body.url)fetch(userInput)should_reject_unauthenticated_forbidden_denies_如需完整指导,请阅读。references/A06_2025-Insecure_Design.md
password\s*=\s*['"][^'"]+['"]Authorization:\s*Basic\s+[A-Za-z0-9+/=]+req\.query\.session?token=sessionidsetsaveregeneraterotateredirect_uristatealg: noneFor full guidance, read.references/A07_2025-Authentication_Failures.md
password\s*=\s*['"][^'"]+['"]Authorization:\s*Basic\s+[A-Za-z0-9+/=]+req\.query\.session?token=sessionidsetsaveregeneraterotateredirect_uristatealg: none如需完整指导,请阅读。references/A07_2025-Authentication_Failures.md
pickle\.loads\(yaml\.load\(SafeLoaderObjectInputStreamBinaryFormatterunserialize\(Marshal\.load\(verifycookie-parsersigned: true==pull_request_target${{ secrets.* }}require(userPath)import(userModule)Assembly.LoadFrom(file):latestuses:For full guidance, read.references/A08_2025-Software_or_Data_Integrity_Failures.md
pickle\.loads\(yaml\.load\(SafeLoaderObjectInputStreamBinaryFormatterunserialize\(Marshal\.load\(verifycookie-parsersigned: true==pull_request_target${{ secrets.* }}require(userPath)import(userModule)Assembly.LoadFrom(file):latestuses:如需完整指导,请阅读。references/A08_2025-Software_or_Data_Integrity_Failures.md
loggingconsole.logauthenticateauthorizepasswordtokensecretcreditCardssnINSERT INTO audit_logfluentbitvectorfilebeatFor full guidance, read.references/A09_2025-Security_Logging_and_Alerting_Failures.md
loggingconsole.logauthenticateauthorizepasswordtokensecretcreditCardssnINSERT INTO audit_logfluentbitvectorfilebeat如需完整指导,请阅读。references/A09_2025-Security_Logging_and_Alerting_Failures.md
catch\s*\(\s*\w*\s*\)\s*\{\s*\}except[^:]*:\s*passcatch\s*\(_?\)\s*=>\s*\{\s*\}try { ... } catch { /* ignore */ }catch (Exception)except Exception:authorizeverifyvalidatecheck*truetrueerr.stackerr.messageasyncexpress-async-errorsasync (req, res) =>BEGINcommitif (fs.exists) { ... fs.read }For full guidance, read.references/A10_2025-Mishandling_of_Exceptional_Conditions.md
catch\s*\(\s*\w*\s*\)\s*\{\s*\}except[^:]*:\s*passcatch\s*\(_?\)\s*=>\s*\{\s*\}try { ... } catch { /* ignore */ }catch (Exception)except Exception:authorizeverifyvalidatecheck*truetrueerr.stackerr.messageexpress-async-errorsasync (req, res) =>BEGINcommitif (fs.exists) { ... fs.read }如需完整指导,请阅读。references/A10_2025-Mishandling_of_Exceptional_Conditions.md
.env*config/secrets/*.yml*.yaml*.json*.tf*.properties| Secret class | Regex (anchor to ensure context) |
|---|---|
| AWS access key | |
| AWS secret key | |
| GCP service-account key | |
| GitHub PAT (classic) | |
| GitHub fine-grained PAT | |
| Slack token | |
| Stripe live key | |
| Stripe restricted | |
| Twilio account SID | |
| Generic JWT | |
| RSA / EC private key | `-----BEGIN (RSA |
| Connection string | |
| Generic high-entropy assignment | |
AKIA…REDACTED…XYZWgit log --all --diff-filter=A -- <path>gitleaks detect --no-bannertrufflehog filesystem ..env*config/secrets/*.yml*.yaml*.json*.tf*.properties| 密钥类别 | 正则表达式(锚定以确保上下文) |
|---|---|
| AWS访问密钥 | |
| AWS密钥 | |
| GCP服务账号密钥 | |
| GitHub PAT(经典版) | |
| GitHub细粒度PAT | |
| Slack令牌 | |
| Stripe生产密钥 | |
| Stripe受限密钥 | |
| Twilio账号SID | |
| 通用JWT | |
| RSA/EC私钥 | `-----BEGIN (RSA |
| 连接字符串 | |
| 通用高熵赋值 | |
AKIA…REDACTED…XYZWgit log --all --diff-filter=A -- <path>gitleaks detect --no-bannertrufflehog filesystem .helmet()express.json({ limit: ... })csurfhttpOnly: truesecure: truesameSite: 'lax'|'strict'text/xmlxml2jsres.redirect(req.query.url)_.merge_.setObject.assign({}, req.body)helmet()express.json({ limit: ... })csurfhttpOnly: truesecure: truesameSite: 'lax'|'strict'xml2jstext/xmlres.redirect(req.query.url)_.merge_.setObject.assign({}, req.body)DEBUG = FalseSECRET_KEYALLOWED_HOSTS['*']@csrf_exemptMIDDLEWARESecurityMiddlewareXFrameOptionsMiddleware.raw().extra().execute()Markup|safeDependsDepends(get_user, use_cache=True)text()DEBUG = FalseSECRET_KEYALLOWED_HOSTS['*']@csrf_exemptMIDDLEWARESecurityMiddlewareXFrameOptionsMiddleware.raw().extra().execute()Markup|safeDependsDepends(get_user, use_cache=True)text()@PreAuthorize@SecuredWebSecurityConfigurerAdapterSecurityFilterChainpermitAll()/actuator/*RestTemplateWebClientTrustAllStrategy@JsonTypeInfo@PreAuthorize@SecuredWebSecurityConfigurerAdapterSecurityFilterChainpermitAll()/actuator/*RestTemplateWebClientTrustAllStrategy@JsonTypeInfoprotect_from_forgerystrong_parametersparams.permit!Rails.application.credentialssecrets.ymlevalsendOpen3.capture2%x{}safe_loadprotect_from_forgerystrong_parametersparams.permit!Rails.application.credentialssecrets.ymlevalsendOpen3.capture2%x{}safe_loadhttp.ServerReadTimeoutWriteTimeoutIdleTimeouthttp.Handle("/", ...)crypto/tlsInsecureSkipVerify: truedb.Query(fmt.Sprintf(...))+exec.Command("sh", "-c", userInput)http.Redirecthttp.ServerReadTimeoutWriteTimeoutIdleTimeouthttp.Handle("/", ...)crypto/tlsInsecureSkipVerify: truedb.Query(fmt.Sprintf(...))+exec.Command("sh", "-c", userInput)http.Redirect[Authorize][AllowAnonymous]JsonSerializerSettings.TypeNameHandling != NoneXmlReaderSettings.DtdProcessing != Prohibitappsettings.json[Authorize][AllowAnonymous]JsonSerializerSettings.TypeNameHandling != NoneXmlReaderSettings.DtdProcessing != Prohibitappsettings.jsoneval(assert(create_function(includerequireunserializemove_uploaded_filemysqli_query(... . $_GET[...])eval(assert(create_function(includerequireunserializemove_uploaded_filemysqli_query(... . $_GET[...])git rev-parse --show-toplevel<project_root>git rev-parse --show-toplevel<project_root>DATE=$(date +%Y-%m-%d)
DIR="<project_root>/audit/${DATE}"
mkdir -p "$DIR"
FILE="${DIR}/report.md"
if [ -e "$FILE" ]; then
TIME=$(date +%H%M%S)
FILE="${DIR}/report-${TIME}.md"
fi$date = Get-Date -Format 'yyyy-MM-dd'
$dir = Join-Path $projectRoot "audit\$date"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$file = Join-Path $dir 'report.md'
if (Test-Path $file) {
$time = Get-Date -Format 'HHmmss'
$file = Join-Path $dir "report-$time.md"
}report.mdreport-HHMMSS.mdDATE=$(date +%Y-%m-%d)
DIR="<project_root>/audit/${DATE}"
mkdir -p "$DIR"
FILE="${DIR}/report.md"
if [ -e "$FILE" ]; then
TIME=$(date +%H%M%S)
FILE="${DIR}/report-${TIME}.md"
fi$date = Get-Date -Format 'yyyy-MM-dd'
$dir = Join-Path $projectRoot "audit\$date"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$file = Join-Path $dir 'report.md'
if (Test-Path $file) {
$time = Get-Date -Format 'HHmmss'
$file = Join-Path $dir "report-$time.md"
}report.mdreport-HHMMSS.mdWriteundefinedundefinedpath/to/file.ts:42references/A0X_2025-<Title>.mdpath/to/file.ts:42references/A0X_2025-<Title>.md@security-auditorgitleaks detect --no-bannertrufflehog filesystem .npm auditpip-auditcargo auditgovulnchecktrivy fs .grype dir:.undefined@security-auditorgitleaks detect --no-bannertrufflehog filesystem .npm auditpip-auditcargo auditgovulnchecktrivy fs .grype dir:.undefinedaudit/.gitignore.gitignoreaudit/.gitignore.gitignore@security-auditor@security-auditor@security-auditor@security-auditor@security-auditor@security-auditor@security-auditor@security-auditornpm auditpip-auditcargo auditgovulnchecktrivynpm auditpip-auditcargo auditgovulnchecktrivyauth.ts:10auth.ts:42auth.ts:88references/A0X_2025-*.mdauth.ts:10auth.ts:42auth.ts:88references/A0X_2025-*.md@security-auditorgitleakstrufflehogsemgrepCodeQLtrivygrypeosv-scanner@security-auditorgitleakstrufflehogsemgrepCodeQLtrivygrypeosv-scanner