建立安全的開發策略

GitHub 進階概念

Stan Konkin

ML Enthusiast, DataCamp

為何安全開發很重要

 

  • 🔑 專案關鍵:確保我們的程式碼安全
  • 💻 自動化安全:減少手動作業
  • 及早防範:在擴大前修補弱點

安全開發

GitHub 進階概念

GitHub Advanced Security 要點

 

  • Code Scanning:找出程式碼中的弱點
  • 🔒 Secret Scanning:偵測並保護敏感資訊
  • 📊 Dependency Graph 與 Dependabot:管理相依並自動套用安全更新

GitHub 進階安全

1 docs.github.com/en/get-started/learning-about-github/about-github-advanced-security
GitHub 進階概念

認識 Dependency Graph

 

 

  • 📊 視覺化:檢視所有專案相依
  • 發現風險:找出相依鏈中的弱點
  • 🚀 追蹤更新:監控相依套件變更

 

相依圖.jpg

GitHub 進階概念

將相依加入我們的儲存庫

requirements-analysis.txt

pandas==1.2.4
numpy==1.20.3
matplotlib==3.4.2
...

requirements-ml.txt

pandas==1.3.0
numpy==1.21.0
scikit-learn==0.24.2
...

setup.py

name="ecommerce-data-hub",
version="0.1",
packages=find_packages(),
...

新增檔案.jpg

GitHub 進階概念

開啟 Dependency Graph

開啟 ecommerce-data-hub 儲存庫

GitHub 進階概念

開啟 Dependency Graph

開啟 Insights 分頁

GitHub 進階概念

開啟 Dependency Graph

點選 Dependency graph 選項

GitHub 進階概念

開啟 Dependency Graph

相依圖中的警示

GitHub 進階概念

開啟 Dependency Graph

Opening5.jpg

GitHub 進階概念

開啟 Dependabot 警示

開啟 Dependabot 警示

GitHub 進階概念

在 Security 分頁檢查 Dependabot 警示

在 Security 分頁檢查 Dependabot 警示

GitHub 進階概念

檢視 Dependabot 警示

檢視 Dependabot 警示

GitHub 進階概念

審查並合併安全更新

審查並合併安全更新

GitHub 進階概念

檢視已更新的警示

檢視已更新的警示

GitHub 進階概念

整合重點

 

  • 📊 Dependency Graph:視覺化相依
  • Dependabot 警示:接收弱點通知
  • 🚀 Dependabot 更新:以 PR 自動修復問題

安全開發

GitHub 進階概念

一起來練習吧!

GitHub 進階概念

Preparing Video For Download...