원클릭으로
source-security-audit
對任一程式碼庫執行全面源碼安全稽核(A–E:相依漏洞、SAST、機密外洩、人工稽核),並提供修補劇本。針對銀行管控 Windows 環境調校。當使用者要求源碼安全檢查、安全稽核、漏洞掃描、機密外洩檢查時使用。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
對任一程式碼庫執行全面源碼安全稽核(A–E:相依漏洞、SAST、機密外洩、人工稽核),並提供修補劇本。針對銀行管控 Windows 環境調校。當使用者要求源碼安全檢查、安全稽核、漏洞掃描、機密外洩檢查時使用。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Initialize or rebuild a repository atlas under docs/ for AI-assisted code navigation. Only for an explicit atlas build, rebuild, refresh, or rescan requested by a human — never for ordinary development, and never inside a delegated subagent task.
把 YouTube 影片網址轉成帶時間戳的繁體中文逐字稿。當使用者貼出影片連結,並想要字幕、逐字稿、影片文案、把影片內容轉成文字、或把影片內容載入對話中討論時,務必使用此 skill。流程為:優先抓取影片現成字幕,抓不到才用本地語音辨識(MOSS + 靜音切片),最後統一簡轉繁體並輸出帶時間戳的文字檔,再把全文帶進對話。
Update or diagnose the OpenAI Codex CLI on this controlled Windows environment. Use for version checks, CLI updates, and update failures. Never bypass TLS or change global certificate settings.
Diagnose and configure Windows Chinese/Japanese/Korean font fallback, especially replacing Noto Sans SC/TC and Noto Sans CJK SC/TC with Sarasa/Gengsha UI fonts system-wide. Use when users report mixed simplified/traditional Chinese font shapes in VS Code, Electron/Chromium apps, Markdown/extension README pages, or other Windows apps; when Noto Sans SC/TC must be substituted; or when ClearType color fringing appears after CJK font changes.
從一個開發順利的成功專案中,透過訪談使用者 + 掃描程式碼,交叉萃取出「讓 AI agent 開發很順」的可遷移、語言/框架無關的個人開發準則,產出可直接放進 ~/.claude/CLAUDE.md 的全域規範,以及一份維護指南。當使用者想把既有專案的成功經驗沉澱成跨專案可複用的全域 AI 協作規範時啟動。觸發語句包含:「整理成開發規範」「提取可復用的準則」「生成 CLAUDE.md」「全域 CLAUDE.md」「把這個專案蒸餾成 skill / 規範」「讓未來的專案也能用這套做法」「探索專案整理成 agent 規範」。即使使用者只說「把這個專案整理成規範」而沒明講「全域」或「可遷移」,只要意圖是沉澱跨專案經驗,也應啟動。
Use when the user asks to install / add a Claude Code skill ("install this skill", "add this skill", "安裝這個 skill", "幫我裝 skill"). Installs by SYMLINKING the skill folder from /home/benny/skills (the canonical git source of truth) into ~/.claude/skills/<name> — never by copying — so `git pull` updates propagate automatically. Handles the varying source layouts and the /plugin exception for marketplace-packaged collections.
| name | source-security-audit |
| description | 對任一程式碼庫執行全面源碼安全稽核(A–E:相依漏洞、SAST、機密外洩、人工稽核),並提供修補劇本。針對銀行管控 Windows 環境調校。當使用者要求源碼安全檢查、安全稽核、漏洞掃描、機密外洩檢查時使用。 |
工具掃描 + 人工稽核的完整流程,適用任一程式碼庫。為銀行管控 Windows 環境調校,已內建常見雷區。所有掃描輸出寫到 scratchpad,不污染 repo;安裝類動作先說明再執行。
先看 repo 根目錄決定走哪條指令:
*.csproj / *.sln → .NET(A 用 dotnet,C 用 Security Code Scan)package.json → Node(A 用 npm audit / pnpm audit)requirements.txt / pyproject.toml → Python(A 用 pip-audit)go.mod → Go(A 用 govulncheck)$env:DOTNET_ROLL_FORWARD='Major'(零安裝跑在更高版本上)。--source winget。dotnet restore <proj> → dotnet list package --vulnerable --include-transitive → dotnet list package --outdatednpm audit --omit=dev(或 pnpm audit / yarn npm audit)pip-auditgovulncheck ./...判讀:High/Critical 優先;若漏洞無修補版,評估實際可達性(攻擊面是否能被不可信輸入觸發、該元件是否用於正式路徑)再定優先序,別只看 CVSS。
# 安裝(一次):dotnet tool install --global Microsoft.CST.DevSkim.CLI
SP=<scratchpad>; DEVSKIM="$HOME/.dotnet/tools/devskim.exe"
DOTNET_ROLL_FORWARD=Major "$DEVSKIM" analyze -I . -O "$SP/devskim.sarif" -f sarif \
-g "**/bin/**" "**/obj/**" "**/node_modules/**" "**/dist/**" "**/build/**" \
"**/publish/**" "**/vendor/**" "**/.git/**" "**/*.min.js" "**/lib/**"
用 Python 解析、過濾第三方/產物雜訊,只看自家程式碼 findings:
import json
j=json.load(open(f"{SP}/devskim.sarif",encoding="utf-8")); run=j["runs"][0]
rules={r["id"]:r.get("name") for r in run["tool"]["driver"]["rules"]}
skip=("node_modules","vendor","dist","build","publish","\\lib\\","/lib/",".min.js",".vs")
for r in run["results"]:
u=r["locations"][0]["physicalLocation"]["artifactLocation"]["uri"]
if any(s in u for s in skip): continue
print(u, rules.get(r["ruleId"]))
常見誤判:字串裡的關鍵字(如 CSP 的 'unsafe-inline' 被當 unsafe)、xmlns 的 http URL。逐一確認再列入。
SecurityCodeScan.VS2019(<PrivateAssets>all</PrivateAssets>)加進專案 → dotnet build 抓 SCS#### 警告 → 掃完還原專案檔,不留改動。semgrep --config p/owasp-top-ten(若可用)或 ESLint security plugins。bandit -r .。# 安裝(一次):winget install --id Gitleaks.Gitleaks --source winget
gitleaks detect --source . --report-path "$SP/gitleaks.json" --no-banner
重點查 git 歷史(檔案即使已刪仍留存):
git log --all --diff-filter=A --pretty=format: --name-only \
-- "*.db" "*.sqlite" "*.pem" "*.key" "*.pfx" "**/dp-keys/*" "*.env" "appsettings*.json" | sort -u
加重風險:加密金鑰圈 + 含「加密憑證/金鑰」的資料檔若同在歷史 → 可被一併還原成明文。
逐項檢查並對照「應有的不變量」,發現偏離才是問題:
'unsafe-inline')。依嚴重性分 🔴高 / 🟠中 / 🟡低;每項給「位置 + 為何是問題 + 修補」。另列「✅ 做得好的部分」避免只報壞消息。最後給「我能做 / 需你做(如金鑰輪換、破壞性操作)」的下一步。
# 0) 先輪換已外洩的憑證/金鑰(通常只有使用者能在後台做)
pip install git-filter-repo # 一次
git bundle create ../backup-$(date +%Y%m%d-%H%M%S).bundle --all # 備份!
git bundle verify <backup> # 驗證可還原
GFR=$(python -c "import git_filter_repo;print(git_filter_repo.__file__)")
python "$GFR" --invert-paths --path <敏感路徑> --path-glob '<glob>' --force
git log --all --pretty=format: --name-only -- "<敏感路徑>" | sort -u # 驗證殘留為空
force-push 是不可逆對外操作,務必先取得使用者明確同意:
git remote add origin <url> # filter-repo 會移除 origin,需重加
git push origin --force --all && git push origin --force --tags
推後提醒:① 遠端(如 GitHub)仍可能短期保留懸空 commit → 憑證當作已外洩;② 他人 clone 過的副本需重新 clone;③ 把敏感路徑加進 .gitignore 以防再犯。
能升版就 pin 已修補版(留在現行 LTS 系列),重跑 A 驗證;無修補版則記「追蹤待修」並評估可達性。