Communitygithub.com

repo-security-scan

掃描儲存庫以找出高信號安全問題並產生報告。用於稽核程式碼庫中洩漏的密碼或易受攻擊的相依性,在發行前或導入不熟悉的儲存庫時使用。依賴 gitleaks 進行密碼掃描,以及 osv-scanner 進行相依性檢查。

repo-security-scan 是什麼?

這款 AI 代理技能「repo-security-scan」能自動化掃描目標儲存庫,找出高信號的安全問題,例如洩漏的機密(秘密)與有漏洞的相依性。它整合了 gitleaks(本地端密碼掃描,輸出會自動遮罩)與 osv-scanner(比對相依性與 OSV 資料庫),產生人類可讀的 report.md 與機器可讀的 summary.json,以及原始工具輸出與日誌。該技能設計為唯讀、不上傳原始碼、gitleaks 輸出已遮罩,且僅在查詢 OSV 時傳送相依性中繼資料至網路。它支援 macOS 與 Ubuntu 平台,提供本機執行指令、示範腳本,並能透過專屬設定檔(.gitleaks.toml、.gitleaksignore、osv-scanner.toml)進行自訂。適合在程式碼稽核、發行前檢查或導入不熟悉專案時使用,有效降低誤報並快速聚焦於真正需要關注的問題。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/unisone/openclaw-skill-suite/tree/main/skills/repo-security-scan

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

repo-security-scan 是做什麼的?

掃描目標儲存庫以找出高信號安全問題,並產生報告。

功能範圍(MVP)

  • 機密掃描:使用 gitleaks(本地掃描;日誌中的機密會被遮罩)
  • 相依性漏洞掃描:使用 osv-scanner(比對相依性與 OSV 資料庫)

輸出內容:

  • report.md — 人類可讀的摘要
  • summary.json — 機器可讀的摘要
  • 原始工具輸出(gitleaks.json、osv.json)+ 日誌

為何選擇此技術組合(信號/雜訊比)

  • gitleaks:預設值強大、速度快、容易透過 .gitleaks.toml / .gitleaksignore 抑制誤報。
  • osv-scanner:透過 OSV 進行準確的相依性漏洞比對(生態系統支援廣泛,通常比各生態系統專屬的「audit」指令雜訊更低)。

(其他掃描器如 Semgrep/SAST 及語言專屬稽核工具可於日後透過明確的 --deep 模式加入,避免造成 CI 失敗的雜訊。)

安全性

  • 唯讀掃描檔案。
  • 不會上傳原始碼。
  • gitleaks 輸出已遮罩(--redact),且報告會避免印出機密。
  • osv-scanner 預設會使用網路查詢 OSV(也可能查詢 deps.dev 以取得套件中繼資料)。它傳送的是相依性中繼資料,而非原始碼。

使用方式

本機執行

從此儲存庫執行:

# 掃描當前儲存庫,輸出寫入 .repo-security-scan/out
bash scripts/repo-security-scan/scan.sh --repo .

# 掃描另一個儲存庫
bash scripts/repo-security-scan/scan.sh --repo /path/to/target --out /tmp/repo-security-scan-out

# 檢視報告
cat .repo-security-scan/out/report.md

示範

bash scripts/demo.sh            # 掃描此儲存庫
bash scripts/demo.sh /path/repo # 掃描目標儲存庫

輸出內容

在輸出目錄(預設:<skill-suite>/.repo-security-scan/out)中:

  • report.md
  • summary.json
  • gitleaks.json、gitleaks.log
  • osv.json、osv.log

退出碼:

  • 0 無發現結果
  • 1 偵測到發現結果
  • 2 掃描器錯誤(缺少工具、執行失敗)

設定 / 允許清單

掃描特定專案時,建議使用儲存庫本機的設定:

  • gitleaks:
    • <repo>/.gitleaks.toml
    • <repo>/.gitleaksignore
  • osv-scanner:
    • <repo>/osv-scanner.toml(僅套用至該目錄)

此技能套件亦包含保守的預設值,位於:

  • .repo-security-scan/gitleaks.toml
  • .repo-security-scan/.gitleaksignore
  • .repo-security-scan/osv-scanner.toml

若要強制指定某個 osv-scanner 設定檔:

bash scripts/repo-security-scan/scan.sh --repo /path/repo --osv-config /path/to/osv-scanner.toml

安裝必要條件

  • macOS:
    • brew install gitleaks osv-scanner jq
  • Ubuntu:
    • sudo apt-get update && sudo apt-get install -y jq
    • 從 releases 安裝 gitleaks 與 osv-scanner,或透過 go install 編譯。

Individual skills in this repo

This repo contains 10 individual skills — each has its own dedicated page.

astra-operator

Delegate computer-use and browser tasks to OpenAI

design-inspo

Find design inspiration from curated gallery sites. Use when a user needs UI/UX references, design examples, or inspiration for specific components (navbars, CTAs, hero sections, landing pages, etc.), full websites, SaaS products, mobile apps, animations, icons, branding, or design systems. Helps select the right inspiration source and browse examples.

graphrag

Build a GraphRAG pipeline over documents. Use when plain vector search returns chunks without connections, when questions need multi-hop reasoning (

mundane-demos

Demo strategy that leads with mundane real-life utility instead of benchmarks. Use when presenting an AI agent or product to non-technical audiences. Covers picking tasks the viewer did this morning, showing end-to-end completion, and letting speed be the wow factor.

release-notes

Generate polished release notes from git history. Use when cutting a release, before publishing a GitHub release, or when you need a changelog from commits between two tags. Groups changes by type, surfaces breaking changes, and drafts highlights.

remotion-product-demos

Create Apple-keynote-quality product demo videos with Remotion. Covers glass phone mockups, floating 3D spheres, typing animations, card UIs, ripple effects, and smooth scene transitions. Use when asked to create product demos, app showcase videos, UI walkthrough animations, or

secure-agent-design

Security architecture patterns for personal AI agents that touch real accounts. Use when designing an agent with access to inbox, calendar, finances, or shopping. Covers per-user isolated VMs, pre-action sentinel checks, least-privilege connectors, human approval gates, and single-use payment credentials.

testimonial-launch

Turn user testimonials into launch distribution. Use when launching a product or feature and you want real user proof to carry the announcement instead of marketing copy. Covers soliciting specific testimonials, curating them, and amplifying via quote-posts.

unisone/openclaw-skill-suite

Create Apple-keynote-quality product demo videos with Remotion. Covers glass phone mockups, floating 3D spheres, typing animations, card UIs, ripple effects, and smooth scene transitions. Use when asked to create product demos, app showcase videos, UI walkthrough animations, or

validator-quotes

Earn and deploy third-party validator quotes for a launch. Use when you need credibility beyond your own claims. Covers who to approach, how to get honest reactions, and how to amplify them via quote-posts, based on the founder/CEO validators behind the Muse launch.

相關技能