啟用及使用 Notebook 安全性掃描器
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
您可以啟用並使用 Notebook Security Scanner,偵測 Colab Enterprise 筆記本 (副檔名為 ipynb
的檔案) 中使用的 Python 套件是否有安全漏洞,並解決這些套件安全漏洞的發現結果。
啟用 Notebook Security Scanner 後,系統每 24 小時會掃描一次 Colab Enterprise 筆記本,並將套件安全漏洞發現項目發布至 Security Command Center 的「發現項目」頁面。
您可以使用筆記本安全性掃描器,掃描在下列區域建立的 Colab Enterprise 筆記本:us-central1
、us-east4
、us-west1
和 europe-west4
。
啟用 Notebook Security Scanner
您可以在機構或專案層級啟用 Notebook Security Scanner。
啟用 Notebook Security Scanner 的方式,取決於是否需要為機構或專案啟用 Security Command Center,以及為機構或專案啟用的 Security Command Center 方案。請根據您的用途,按照相關章節的指示操作:
啟用進階級服務
如果貴機構沒有 Security Command Center,請為機構或專案啟用 Security Command Center Premium 方案,並啟用 Notebook Security Scanner。
前往 Google Cloud 控制台的 Security Command Center 頁面。
前往 Security Command Center
- 在資源選取器中,選取機構或專案。
- 按一下「取得 Security Command Center」。
- 選取「進階」層級,然後按一下「下一步」。
- 在「Notebook Security Scanner」(筆記本安全性掃描器) 部分,從清單中選取「Enable」(啟用),然後按一下「Next」(下一步)。
- 選取「自動授予角色」,然後按一下「授予角色」。
- 服務帳戶佈建完成後,請按「Next」(下一步)。
- 如要完成啟用程序,請按一下「完成」。
現有的 Premium 或 Enterprise 方案
如果您的機構或專案已啟用 Security Command Center Premium 或 Enterprise 級別,請啟用 Notebook Security Scanner。
前往 Google Cloud 控制台的 Security Command Center 頁面。
前往 Security Command Center
- 按一下「設定」settings。
- 在「筆記本安全性掃描器」資訊卡中,
按一下「管理設定」。
- 在專案的「Notebook Security Scanner」(筆記本安全掃描器) 欄中,選取「Enable」(啟用)。
查看並修正套件安全漏洞發現項目
啟用 Notebook Security Scanner 後,這項工具會每隔 24 小時掃描專案或機構中的 Colab Enterprise 筆記本 (檔名副檔名為 ipynb
的檔案),偵測 Python 套件中的安全漏洞,並將這些發現發布至 Security Command Center 的「發現」頁面。如果是新建立的 Colab Enterprise 筆記本,套件安全漏洞發現項目最多可能需要四小時,才會顯示在 Security Command Center 的「發現項目」頁面。
如要在 Security Command Center 中查看套件安全漏洞發現項目,請按照下列步驟操作:
在 Google Cloud 控制台中,前往 Security Command Center 的「發現項目」頁面。
前往「發現項目」
在資源選取器中,選取機構或專案。
在「快速篩選器」部分,前往「來源顯示名稱」子部分,然後選取「Notebook Security Scanner」。
「Findings query results」(發現項目查詢結果) 面板只會顯示 Notebook Security Scanner 的套件安全漏洞發現項目。
如要查看特定發現項目的詳細資料,請按一下「類別」欄中的發現項目名稱。發現項目詳細資料面板會展開,顯示發現項目詳細資料摘要。
如要解決套件安全漏洞發現結果,請按照發現結果「後續步驟」一節中的步驟操作。
在某些情況下,可能無法修正套件漏洞。
在這種情況下,建議您使用其他 Python 套件。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-10 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-10 (世界標準時間)。"],[],[]]