<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ghas on Tarragon</title><link>https://tarrragon.github.io/blog/tags/ghas/</link><description>Recent content in Ghas on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Mon, 18 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/ghas/index.xml" rel="self" type="application/rss+xml"/><item><title>GitHub Advanced Security</title><link>https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/github-advanced-security/</link><pubDate>Mon, 18 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/github-advanced-security/</guid><description>&lt;p>GitHub Advanced Security（GHAS）是 GitHub 內建的 &lt;em>application security platform&lt;/em>、由四大模組組成：&lt;em>Code Scanning&lt;/em>（CodeQL 為預設 SAST、可接受第三方 SARIF）、&lt;em>Secret Scanning&lt;/em>（偵測 leaked credential、含 Push Protection 預防 push）、&lt;em>Dependency Review&lt;/em>（PR 級依賴變更 gate）、&lt;em>Dependabot&lt;/em>（自動化依賴 update + alert、細節見獨立 vendor 頁）。它跟 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &amp;#43; Code (SAST) &amp;#43; Container &amp;#43; IaC &amp;#43; Cloud (CSPM)、Reachability analysis">Snyk&lt;/a> / &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &amp;#43; Secret &amp;#43; License &amp;#43; SBOM、Apache 2.0、CI 友善">Trivy&lt;/a> 等獨立 SCA 工具的核心差異是 &lt;em>跟 GitHub workflow / PR / Security tab 深度整合&lt;/em> — security finding 直接出現在 PR review 跟 organization Security overview、不需另一個 dashboard。&lt;/p>
&lt;h2 id="服務定位">服務定位&lt;/h2>
&lt;p>GHAS 的核心定位是 &lt;em>把 application security 控制面收斂回 GitHub 平台&lt;/em>：SAST、Secret Scanning、Dependency Review、Dependabot 共用 GitHub 的 identity / permission / PR / branch protection / Actions / Security tab，讓 security finding 跟 code review 在同一個 surface 上決策。這跟 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &amp;#43; Code (SAST) &amp;#43; Container &amp;#43; IaC &amp;#43; Cloud (CSPM)、Reachability analysis">Snyk&lt;/a> 走「跨 SCM、跨雲、自有 dashboard」是相反方向 — Snyk 把 security 抽到平台之上、GHAS 把 security 釘在 GitHub 之內。&lt;/p>
&lt;p>跟 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &amp;#43; Secret &amp;#43; License &amp;#43; SBOM、Apache 2.0、CI 友善">Trivy&lt;/a> 比、定位差更遠。Trivy 主打 &lt;em>container image / IaC / SBOM scan&lt;/em>、open-source 免費、適合塞進任何 CI；GHAS 主打 &lt;em>source code + secret + dependency&lt;/em>、Enterprise 付費、container scan 有但偏弱。兩者通常 &lt;em>並存&lt;/em> — Trivy 跑 container artifact、GHAS 跑 source repo。&lt;/p></description><content:encoded><![CDATA[<p>GitHub Advanced Security（GHAS）是 GitHub 內建的 <em>application security platform</em>、由四大模組組成：<em>Code Scanning</em>（CodeQL 為預設 SAST、可接受第三方 SARIF）、<em>Secret Scanning</em>（偵測 leaked credential、含 Push Protection 預防 push）、<em>Dependency Review</em>（PR 級依賴變更 gate）、<em>Dependabot</em>（自動化依賴 update + alert、細節見獨立 vendor 頁）。它跟 <a href="/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &#43; Code (SAST) &#43; Container &#43; IaC &#43; Cloud (CSPM)、Reachability analysis">Snyk</a> / <a href="/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &#43; Secret &#43; License &#43; SBOM、Apache 2.0、CI 友善">Trivy</a> 等獨立 SCA 工具的核心差異是 <em>跟 GitHub workflow / PR / Security tab 深度整合</em> — security finding 直接出現在 PR review 跟 organization Security overview、不需另一個 dashboard。</p>
<h2 id="服務定位">服務定位</h2>
<p>GHAS 的核心定位是 <em>把 application security 控制面收斂回 GitHub 平台</em>：SAST、Secret Scanning、Dependency Review、Dependabot 共用 GitHub 的 identity / permission / PR / branch protection / Actions / Security tab，讓 security finding 跟 code review 在同一個 surface 上決策。這跟 <a href="/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &#43; Code (SAST) &#43; Container &#43; IaC &#43; Cloud (CSPM)、Reachability analysis">Snyk</a> 走「跨 SCM、跨雲、自有 dashboard」是相反方向 — Snyk 把 security 抽到平台之上、GHAS 把 security 釘在 GitHub 之內。</p>
<p>跟 <a href="/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &#43; Secret &#43; License &#43; SBOM、Apache 2.0、CI 友善">Trivy</a> 比、定位差更遠。Trivy 主打 <em>container image / IaC / SBOM scan</em>、open-source 免費、適合塞進任何 CI；GHAS 主打 <em>source code + secret + dependency</em>、Enterprise 付費、container scan 有但偏弱。兩者通常 <em>並存</em> — Trivy 跑 container artifact、GHAS 跑 source repo。</p>
<p>跟 <a href="/blog/backend/07-security-data-protection/vendors/dependabot/" data-link-title="Dependabot" data-link-desc="GitHub 原生依賴更新自動化、Version Update &#43; Security Update &#43; Alerts、Grouped Updates 減 PR noise、Auto-merge 配 branch protection">Dependabot</a> 的關係是 <em>內含</em> — Dependabot 是 GHAS 四模組之一、跟 GHAS 同一個控制平面、跟 PR / Security tab 同一條 evidence chain。本頁聚焦 GHAS 整體 + Code Scanning / Secret Scanning / Dependency Review；Dependabot 的 update PR 政策、ecosystem 覆蓋、alert routing 細節留在該頁。</p>
<p>關鍵張力：GHAS 計費走 <em>per-active-committer + per-repo</em>、2024 後 Secret Scanning 跟 Code Scanning 拆開計費。大型 mono-repo 或 committer 數量膨脹的組織會撞到成本天花板、需要選擇性 enable repo + 拆模組買；同時、Push Protection 這類 <em>預防型</em> 控制只有 enable 後才有效、選擇性 enable 等於默認 risk 接受。</p>
<h2 id="本章目標">本章目標</h2>
<p>讀完本頁、讀者能判斷：</p>
<ol>
<li>GHAS 四大模組各自承擔哪段控制責任（SAST / Secret / PR-level dependency gate / 自動 update）、哪些跟 <a href="/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &#43; Code (SAST) &#43; Container &#43; IaC &#43; Cloud (CSPM)、Reachability analysis">Snyk</a> / <a href="/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &#43; Secret &#43; License &#43; SBOM、Apache 2.0、CI 友善">Trivy</a> 重疊或互補</li>
<li>CodeQL 跟 SARIF 標準的關係、為什麼第三方 SAST 工具的 finding 也能進 GHAS Security tab</li>
<li>Secret Scanning 的 <em>Push Protection</em>（預防 push）跟 <em>Secret Scanning Alert</em>（偵測 leaked）的職責差、partner pattern vs custom pattern 何時用</li>
<li>何時用 GHAS、何時改走 Snyk / Trivy / GitLab Ultimate（GitLab 自家相當品）</li>
</ol>
<h2 id="最短判讀路徑">最短判讀路徑</h2>
<p>判斷 GHAS 配置是否健康、最少看四件事：</p>
<ul>
<li><strong>誰能 enable / disable</strong>：Organization owner / Security manager role 配置、enable GHAS 的 audit log 是否同步、誰能改 Code Scanning workflow（branch protection 是否擋住 workflow file 直接 push）</li>
<li><strong>哪些 repo 開啟</strong>：Org Security overview 看 <em>Code Scanning / Secret Scanning / Dependency Review coverage</em>、新建 repo 是否預設啟用（Organization-level default setting）、private / internal / public repo 是否一致開啟</li>
<li><strong>Push Protection 狀態</strong>：Secret Scanning Push Protection 是否 organization-wide enable、bypass 權限給誰（developer 個人 bypass vs 必須走 Security team approval）、bypass 事件是否進 audit</li>
<li><strong>Secret Scanning Coverage</strong>：partner pattern（AWS / GCP / Stripe / Slack 等預配）是否全開、custom pattern 是否涵蓋自家 internal token（service token、internal API key）、historical scan 是否跑過（不只新 commit、舊 commit 也要掃）</li>
</ul>
<p>四件事任一缺失、就是 <a href="/blog/backend/knowledge-cards/secret-management/" data-link-title="Secret Management" data-link-desc="說明 token、key、password 與憑證如何保存、輪替與撤銷">Secret Management</a> 跟 <a href="/blog/backend/07-security-data-protection/supply-chain-integrity-and-artifact-trust/" data-link-title="7.12 供應鏈完整性與 Artifact 信任" data-link-desc="定義 build provenance、artifact 信任與交付鏈風險問題">Supply Chain Integrity</a> 邊界的待補項目。</p>
<h2 id="日常操作與決策形狀">日常操作與決策形狀</h2>
<p><strong>Code Scanning 走 SARIF 標準</strong>：Code Scanning 不只是 CodeQL 的 UI、是 <em>SAST aggregation layer</em>。所有 SAST 結果（CodeQL 預設、或 Semgrep / Snyk Code / Brakeman / Bandit / SonarCloud / Checkmarx 等第三方）以 SARIF（Static Analysis Results Interchange Format）upload 到 Code Scanning、Security tab 統一展示、PR review 統一標註。意義是 <em>組織可以用多個 SAST 工具但只看一個 dashboard</em> — 不需要每個 vendor 各自登入。多工具 SARIF upload 用 GitHub Actions 的 <code>github/codeql-action/upload-sarif</code> step。</p>
<p><strong>CodeQL 是 first-class query language</strong>：CodeQL 用 Datalog-like 語法寫 <em>自定 query</em>、可以檢測 <em>organization-specific anti-pattern</em>（例：禁用某內部 deprecated function、強制 input validation 在特定 trust boundary）。vendor-provided pack（GitHub 維護的 CodeQL pack）覆蓋 OWASP Top 10 / CWE Top 25、自定 query 補組織 idiomatic check。代價是 <em>CodeQL 學習曲線陡</em> — 不是 regex / AST pattern、是完整的 graph query language。</p>
<p><strong>Secret Scanning 三層職責</strong>：Secret Scanning 分三層。<em>Partner pattern</em> — GitHub 跟 AWS / GCP / Stripe / Slack / npm 等 vendor 預配 token pattern、預設 detection 範圍最大、leaked token 還會通知 vendor revoke。<em>Push Protection</em> — commit push 前 scan、發現 secret 直接 reject push、開發者必須先移除才能 push；這是 <em>預防</em> 不是 <em>偵測</em>、不需要等 leaked 後 rotation。<em>Custom pattern</em> — 組織自己的 internal token（service-to-service API key、legacy auth token）寫 regex pattern、配 validation endpoint 降 FP。</p>
<p><strong>Dependency Review 是 PR-level gate</strong>：每個 PR 跑 <em>新增 / 升級依賴的漏洞檢查 + license check</em>、把 <em>新引入 CVE</em> 列在 PR review、可設 branch protection 強制 PR 過 Dependency Review 才能 merge。這跟 <a href="/blog/backend/07-security-data-protection/vendors/dependabot/" data-link-title="Dependabot" data-link-desc="GitHub 原生依賴更新自動化、Version Update &#43; Security Update &#43; Alerts、Grouped Updates 減 PR noise、Auto-merge 配 branch protection">Dependabot</a> 是互補關係：Dependabot 是 <em>已 merge 依賴的 update PR</em>（時間軸：merge 後 vuln 出現、自動發 update PR）、Dependency Review 是 <em>PR 加新依賴時的 gate</em>（時間軸：merge 前 vuln 已知、擋 PR）。兩條軸都要開。</p>
<p><strong>Security overview 是 org-level dashboard</strong>：Organization Security tab 看 <em>跨 repo</em> 的 Code Scanning / Secret Scanning / Dependency / Dependabot alert 彙整、用 repo / severity / age filter 排序。對於 <em>security team 不是 repo owner</em> 的組織、Security manager role 給 security team 跨 repo read + triage 權限、不需要 admin。</p>
<p><strong>Security Advisories（CVE 揭露 workflow）</strong>：自家 OSS / 商業 product 出 CVE 時、走 <em>GitHub Security Advisory</em> — 在 private fork 修補、coordinated disclosure 時間到公開 advisory、GitHub 自動向 <a href="https://www.cve.org/">CVE Numbering Authority</a> 申請 CVE ID。這條 workflow 是 <em>維護者視角</em>、不是 <em>使用者視角</em>；使用者收到的是其他人發的 advisory 進 Dependabot alert。</p>
<p><strong>SARIF integration 是 GHAS 的 <em>aggregation</em> 角色關鍵</strong>：GHAS 不強迫只用 CodeQL — Snyk Code / Semgrep / SonarCloud 等 SAST 工具跑完輸出 SARIF、CI 上傳到 GitHub、Security tab 集中展示。意義是 <em>組織用 Snyk 做 SAST、但 finding 走 GHAS UI</em> 是合法配置；GHAS 賣的不只是 CodeQL、是 SAST 統一視圖。</p>
<h2 id="核心取捨表">核心取捨表</h2>
<table>
  <thead>
      <tr>
          <th>取捨維度</th>
          <th>GHAS</th>
          <th>Snyk</th>
          <th>Trivy</th>
          <th>Dependabot（GHAS 子模組）</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>主要範圍</td>
          <td>Source code + secret + dependency（PR-level）</td>
          <td>SCA + Container + IaC + SAST（跨 SCM）</td>
          <td>Container image + IaC + SBOM scan</td>
          <td>依賴 update + alert（merged code）</td>
      </tr>
      <tr>
          <td>SCM 綁定</td>
          <td>緊綁 GitHub</td>
          <td>跨 GitHub / GitLab / Bitbucket / Azure Repos</td>
          <td>無 SCM 綁定、跑在 CI / artifact registry</td>
          <td>緊綁 GitHub</td>
      </tr>
      <tr>
          <td>SAST 引擎</td>
          <td>CodeQL 預設 + 第三方 SARIF aggregation</td>
          <td>Snyk Code（DeepCode）</td>
          <td>無 SAST</td>
          <td>無</td>
      </tr>
      <tr>
          <td>Secret Scanning</td>
          <td>Partner pattern + Push Protection + custom pattern</td>
          <td>Snyk Secret Scanning（較弱）</td>
          <td>有限（filesystem secret scan）</td>
          <td>無</td>
      </tr>
      <tr>
          <td>Container 強度</td>
          <td>中（Code Scanning 可掃 Dockerfile）</td>
          <td>強（Snyk Container 是主打）</td>
          <td>強（Trivy 是 container scan 標準）</td>
          <td>無</td>
      </tr>
      <tr>
          <td>License / SBOM</td>
          <td>有（Dependency Review 含 license）</td>
          <td>強（SBOM 生成、license compliance dashboard）</td>
          <td>強（SBOM 是 first-class）</td>
          <td>無</td>
      </tr>
      <tr>
          <td>PR 整合</td>
          <td>深 — Security tab + PR review 直連</td>
          <td>中 — GitHub Check + 跨 SCM PR comment</td>
          <td>中 — 第三方 Action 整合</td>
          <td>深 — 自動發 PR</td>
      </tr>
      <tr>
          <td>計費</td>
          <td>Per-active-committer + per-repo（Enterprise）</td>
          <td>Per-developer + tier</td>
          <td>Open source 免費（Aqua 商業版加值）</td>
          <td>GHAS 一部分</td>
      </tr>
      <tr>
          <td>適合</td>
          <td>GitHub-heavy org、想統一 PR + security UI</td>
          <td>多 SCM / 多雲、SCA + Container 一站、license 強需求</td>
          <td>Container / IaC scan 為主、CI pluggable</td>
          <td>GitHub repo 想要自動依賴 update</td>
      </tr>
      <tr>
          <td>不適合</td>
          <td>GitLab / Bitbucket / 自管 Git 為主</td>
          <td>GitHub-only 又要省成本</td>
          <td>需要 SAST + Secret Scanning</td>
          <td>不想自動產生 PR（噪音）</td>
      </tr>
  </tbody>
</table>
<p>選 GHAS 的核心訴求：<em>GitHub 是 SCM</em> + 想 <em>PR review 跟 security finding 合一</em> + Enterprise 預算可吸收 per-committer cost。GitLab 主要的組織直接走 GitLab Ultimate 的對等功能；多 SCM 或 container 為主走 Snyk + Trivy 組合。</p>
<h2 id="進階主題">進階主題</h2>
<p><strong>CodeQL custom query 開發</strong>：寫自定 query 用 CodeQL CLI 本地開發、跑 <code>codeql database analyze</code>、SARIF output 上傳。常見場景：禁用 internal deprecated API、特定 framework 的 misuse pattern、組織 idiomatic security check。Query pack 可以 publish 到 GitHub Container Registry 或 internal registry、跨 repo 復用。代價是 <em>維護成本</em> — CodeQL query language 學習曲線陡、組織需要至少 1-2 個 security engineer 專門養護。</p>
<p><strong>Push Protection bypass workflow</strong>：Push Protection reject push 後、developer 可以 <em>bypass</em>（標記 false positive / test data / 風險已知）。Bypass 權限治理是關鍵 — 開放給 developer 個人 bypass 失去預防意義、強制 Security team approval 又拖慢 dev velocity。常見折中：低風險 pattern（test fixture token）developer 可 bypass、高風險 pattern（production credential）必須 Security team approve；所有 bypass 事件進 audit log。</p>
<p><strong>跟 GitHub Actions 整合</strong>：Code Scanning 走 GitHub Actions workflow 跑 CodeQL — <code>github/codeql-action/init</code> + <code>github/codeql-action/analyze</code>。同 workflow 可以加 <code>upload-sarif</code> step 接第三方 SAST 結果。Actions 用 GitHub-hosted runner 跑 CodeQL 是預設、大型 repo 跑 CodeQL analyze 可能超時、需改 self-hosted runner（大 RAM / 多 CPU）— 但 self-hosted runner 自身是 supply chain 風險、需要 ephemeral runner + 限制 secret access。</p>
<p><strong>SARIF 多工具整合</strong>：第三方 SAST / SCA / Container scan 工具（Snyk / Semgrep / Trivy / Brakeman / Bandit / Gosec）跑完輸出 SARIF、CI 上傳到 GHAS。實務上組織常用 <em>CodeQL + Semgrep</em> 雙軌 — CodeQL 跑深度 graph query、Semgrep 跑快速 pattern 規則；finding 在 Security tab 用 <em>tool</em> filter 分開看。</p>
<p><strong>Secret Scanning partner pattern</strong>：GitHub 維護的 partner pattern list 涵蓋 AWS / GCP / Azure / Stripe / Slack / npm / Docker Hub / GitHub PAT 等。leaked token detect 後、GitHub 自動通知 vendor、vendor 端可選擇 <em>自動 revoke</em> 該 token。意義是 <em>組織不需要做 rotation</em> — vendor 已經把 leaked token 廢掉。custom pattern 則需要組織自己提供 validation endpoint、GHAS 呼叫驗證才確認是真 leak。</p>
<p><strong>GHAS Cloud-hosted vs Self-hosted Runner 治理</strong>：CodeQL 跑在 GitHub-hosted runner 是預設、所有 source code 上傳到 GitHub 運算環境。對 <em>source code 機密度高</em> 的組織（金融 / 國防 / 法規限制 source 出境）、需走 self-hosted runner。Self-hosted runner 的供應鏈風險見 <a href="/blog/backend/07-security-data-protection/red-team/cases/supply-chain/github-oauth-2022-token-supply-chain/" data-link-title="7.R7.2.2 GitHub OAuth 2022：第三方 token 供應鏈風險" data-link-desc="第三方整合 token 被竊後，如何形成跨組織存取風險">GitHub OAuth 2022</a> — runner token 是 supply chain entry、OIDC short-lived token 是建議方向。</p>
<p><strong>GHAS Enterprise pricing trap</strong>：Per-active-committer 計費、organization 內所有 <em>過去 90 天有 commit</em> 的 user 都算 active committer、即使只 commit 1 行也計費。大型公司容易超支；2024 後 Secret Scanning 跟 Code Scanning 拆開計費、可只買 Secret Scanning（單價較低）給全 org、Code Scanning 給關鍵 repo。Public repo 上 GHAS 功能多數免費（Code Scanning、Secret Scanning、Dependency Review）；GitHub Enterprise Cloud 的 internal / private repo 才落入 GHAS 計費範圍 — 兩者範圍不同、新組織常踩到把 private repo 全開的成本。</p>
<h2 id="排錯與失敗快速判讀">排錯與失敗快速判讀</h2>
<ul>
<li><strong>新建 repo 沒自動開 GHAS</strong>：Organization-level default 沒設、新 repo 預設 disable — 開 Organization Security settings 的 <em>Enable for new repositories</em>、現有 repo 用 bulk enable</li>
<li><strong>Push Protection 大量誤殺</strong>：custom pattern regex 太寬、合法字串被當 secret — 加 validation endpoint 或收緊 regex、bypass 統計看 FP rate</li>
<li><strong>Secret Scanning 沒掃歷史 commit</strong>：只 enable 後新 commit 觸發、舊 commit leaked secret 沒被發現 — 跑 <em>historical scan</em>（enable 後 GitHub 自動掃過去全部 commit）、可能花數小時</li>
<li><strong>Dependency Review 沒擋住 vuln PR</strong>：Branch protection 沒加 <em>Dependency Review</em> required check — 加進 required status check、新 PR 才強制過</li>
<li><strong>Code Scanning workflow 跑很久 / 超時</strong>：repo 太大、GitHub-hosted runner RAM 不足 — 換 larger runner（GitHub Larger Runners）或 self-hosted、或只跑 changed file analysis</li>
<li><strong>Custom CodeQL query FP 多</strong>：query 寫得太寬、commit 都跳 alert — 加 <code>@precision high</code> 標籤、用 <code>Sink-Source</code> 分析降低 reach</li>
<li><strong>第三方 SAST SARIF 沒進 Security tab</strong>：upload-sarif step 沒設對 category 或 permissions — <code>security-events: write</code> permission 必須在 workflow 給；同 repo 多工具用不同 <code>category</code> 區分</li>
<li><strong>Bypass 沒進 audit</strong>：Push Protection bypass 沒同步到 SIEM — Enterprise audit log streaming 開、event filter 加 <code>secret_scanning.bypass</code></li>
</ul>
<h2 id="何時改走其他服務">何時改走其他服務</h2>
<table>
  <thead>
      <tr>
          <th>需求形狀</th>
          <th>改走</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>多 SCM（GitHub + GitLab + Bitbucket）</td>
          <td><a href="/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &#43; Code (SAST) &#43; Container &#43; IaC &#43; Cloud (CSPM)、Reachability analysis">Snyk</a></td>
      </tr>
      <tr>
          <td>Container image scan 為主</td>
          <td><a href="/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &#43; Secret &#43; License &#43; SBOM、Apache 2.0、CI 友善">Trivy</a> 或 Snyk Container</td>
      </tr>
      <tr>
          <td>SBOM 生成 + license compliance</td>
          <td><a href="/blog/backend/07-security-data-protection/vendors/syft-grype/" data-link-title="Syft &#43; Grype" data-link-desc="Anchore 開源姐妹工具：Syft 產 SBOM (CycloneDX / SPDX) &#43; Grype scan 漏洞、Unix philosophy、cosign attestation 整合">Syft + Grype</a>（SBOM-first OSS）/ <a href="/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &#43; Code (SAST) &#43; Container &#43; IaC &#43; Cloud (CSPM)、Reachability analysis">Snyk</a> + <a href="/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &#43; Secret &#43; License &#43; SBOM、Apache 2.0、CI 友善">Trivy</a>（SBOM 含在 scan）</td>
      </tr>
      <tr>
          <td>GitLab 為主</td>
          <td>GitLab Ultimate（SAST / Secret Detection / Dependency Scanning 內建）</td>
      </tr>
      <tr>
          <td>Secret scan 但不在 GitHub</td>
          <td>GitGuardian / Gitleaks</td>
      </tr>
      <tr>
          <td>Runtime detection（不只 source code）</td>
          <td><a href="/blog/backend/07-security-data-protection/detection-coverage-and-signal-governance/" data-link-title="7.13 偵測覆蓋率與訊號治理" data-link-desc="定義偵測覆蓋、訊號品質與誤報成本的治理問題">7.13 偵測覆蓋率與訊號治理</a> 系列工具</td>
      </tr>
  </tbody>
</table>
<h2 id="不在本頁內的主題">不在本頁內的主題</h2>
<ul>
<li>CodeQL 完整 query language reference</li>
<li>Dependabot 的 update PR 政策、ecosystem 覆蓋、grouped update（見 <a href="/blog/backend/07-security-data-protection/vendors/dependabot/" data-link-title="Dependabot" data-link-desc="GitHub 原生依賴更新自動化、Version Update &#43; Security Update &#43; Alerts、Grouped Updates 減 PR noise、Auto-merge 配 branch protection">Dependabot vendor 頁</a>）</li>
<li>GHAS Enterprise Server（自管 GitHub）跟 Cloud GHAS 的功能差異</li>
<li>各語言 / 框架的 CodeQL pack 完整覆蓋表</li>
<li>GHAS 跟 GitHub Copilot Autofix 整合的 AI-assisted remediation 細節</li>
</ul>
<h2 id="案例回寫">案例回寫</h2>
<p>GHAS 在 07 案例庫沒有 <em>直接 GHAS-level vendor 事件</em>。對照引用展示 GHAS 在 supply chain / source-level 控制的能力邊界：</p>
<table>
  <thead>
      <tr>
          <th>案例</th>
          <th>跟 GHAS 的關係</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><a href="/blog/backend/07-security-data-protection/red-team/cases/supply-chain/log4shell-cve-2021-44228-component-chain/" data-link-title="7.R7.2.7 Log4Shell 2021：共用元件風險與修補鏈" data-link-desc="共用元件漏洞如何同步影響多服務，並迫使團隊建立依賴治理 workflow">Log4Shell CVE-2021-44228</a></td>
          <td>Dependency Review + Code Scanning 應覆蓋 transitive 依賴、不只 direct import；Security Advisory 是維護者揭露 CVE 的 workflow</td>
      </tr>
      <tr>
          <td><a href="/blog/backend/07-security-data-protection/red-team/cases/supply-chain/xz-backdoor-2024-open-source-supply-chain/" data-link-title="7.R7.2.4 XZ Backdoor 2024：開源供應鏈長期滲透" data-link-desc="開源維護鏈遭滲透後，為何會直接影響廣泛 Linux 發行流程">XZ Backdoor 2024</a></td>
          <td>對照啟示 — GHAS Dependency Review 看 <em>package version</em>、看不到 <em>maintainer takeover</em>；需補 release-tarball vs git tag 差異跟 maintainer trust baseline</td>
      </tr>
      <tr>
          <td><a href="/blog/backend/07-security-data-protection/red-team/cases/supply-chain/solarwinds-2020-sunburst/" data-link-title="7.R7.2.1 SolarWinds 2020：更新鏈被濫用" data-link-desc="合法更新流程遭植入後，攻擊者如何長期潛伏與橫向擴散">SolarWinds 2020 Sunburst</a></td>
          <td>對照啟示 — Code Scanning 是 source-level、看不到 build-time 植入；需配合 artifact provenance（SLSA L2+）+ reproducible build</td>
      </tr>
      <tr>
          <td><a href="/blog/backend/07-security-data-protection/red-team/cases/supply-chain/github-oauth-2022-token-supply-chain/" data-link-title="7.R7.2.2 GitHub OAuth 2022：第三方 token 供應鏈風險" data-link-desc="第三方整合 token 被竊後，如何形成跨組織存取風險">GitHub OAuth 2022 Token Supply Chain</a></td>
          <td>對照啟示 — GHAS 自身 token / Actions 權限治理是 supply chain risk、Push Protection + OIDC trust（非長期 token）是 mitigation</td>
      </tr>
      <tr>
          <td><a href="/blog/backend/07-security-data-protection/supply-chain-integrity-and-artifact-trust/" data-link-title="7.12 供應鏈完整性與 Artifact 信任" data-link-desc="定義 build provenance、artifact 信任與交付鏈風險問題">7.12 供應鏈完整性與 Artifact 信任</a></td>
          <td>GHAS 是 supply chain 治理工具集、章節原則對應四模組 workflow</td>
      </tr>
  </tbody>
</table>
<h2 id="下一步路由">下一步路由</h2>
<ul>
<li>上游：<a href="/blog/backend/07-security-data-protection/supply-chain-integrity-and-artifact-trust/" data-link-title="7.12 供應鏈完整性與 Artifact 信任" data-link-desc="定義 build provenance、artifact 信任與交付鏈風險問題">7.12 供應鏈完整性與 Artifact 信任</a></li>
<li>平行：<a href="/blog/backend/07-security-data-protection/vendors/snyk/" data-link-title="Snyk" data-link-desc="跨 SCM 多模組 application security platform：Open Source (SCA) &#43; Code (SAST) &#43; Container &#43; IaC &#43; Cloud (CSPM)、Reachability analysis">Snyk</a>、<a href="/blog/backend/07-security-data-protection/vendors/trivy/" data-link-title="Trivy" data-link-desc="Aqua Security 開源 all-in-one scanner：Container / Filesystem / K8s / IaC &#43; Secret &#43; License &#43; SBOM、Apache 2.0、CI 友善">Trivy</a>、<a href="/blog/backend/07-security-data-protection/vendors/dependabot/" data-link-title="Dependabot" data-link-desc="GitHub 原生依賴更新自動化、Version Update &#43; Security Update &#43; Alerts、Grouped Updates 減 PR noise、Auto-merge 配 branch protection">Dependabot</a>、<a href="/blog/backend/07-security-data-protection/vendors/syft-grype/" data-link-title="Syft &#43; Grype" data-link-desc="Anchore 開源姐妹工具：Syft 產 SBOM (CycloneDX / SPDX) &#43; Grype scan 漏洞、Unix philosophy、cosign attestation 整合">Syft + Grype</a>（SBOM 走 SARIF 進 GHAS Code Scanning 是常見組合）</li>
<li>下游：<a href="/blog/backend/07-security-data-protection/secrets-and-machine-credential-governance/" data-link-title="7.6 秘密管理與機器憑證治理" data-link-desc="以問題驅動方式整理 secret、token、key 與機器身份治理">7.6 秘密管理與機器憑證治理</a>（Secret Scanning 配 <a href="/blog/backend/07-security-data-protection/vendors/hashicorp-vault/" data-link-title="HashiCorp Vault" data-link-desc="Self-hosted secret management 與 dynamic credential / encryption-as-a-service / PKI engine、跨雲跨環境的 secret 控制面">Vault</a> rotation）</li>
<li>跨類：<a href="/blog/backend/07-security-data-protection/detection-coverage-and-signal-governance/" data-link-title="7.13 偵測覆蓋率與訊號治理" data-link-desc="定義偵測覆蓋、訊號品質與誤報成本的治理問題">7.13 偵測覆蓋率與訊號治理</a>（GHAS alert 進 SIEM 的 routing）</li>
<li>跨模組：<a href="/blog/backend/08-incident-response/vendors/" data-link-title="事故處理 Vendor 清單" data-link-desc="規劃 on-call、incident response、status page 與 postmortem 工具的服務頁撰寫順序與判準">8 事故處理 vendor 清單</a>（leaked secret / SAST critical finding 進 IR 流程）</li>
<li>官方：<a href="https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security">GitHub Advanced Security Documentation</a></li>
</ul>
]]></content:encoded></item></channel></rss>