Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
開発者のためのGitHub Advanced Security入門セキュリティを向上させよう!...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hirono Baba
July 25, 2023
Technology
1.6k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
開発者のためのGitHub Advanced Security入門セキュリティを向上させよう!/cndfpre2023-baba
Hirono Baba
July 25, 2023
Transcript
27 slides
開発者のための GitHub Advanced Security入門 セキュリティを向上させよう! 2023/7/25 Cloud Native Days Fukuoka
2023 プレイベント 馬場ひろの Hirono Baba
スピーカーについて ◼ 馬場ひろの ◼ (株)オルターブース所属 ◼ ex歯医者さん ◼ 認定スクラムマスター ◼
AzureやGitHub, .NETがんばって ます @nina-sensei
アジェンダ ◼ 今日話すこと ◼ GHAS(GitHub Advanced Security)とは ◼ Code Scanningについて
◼ Secret Scanningについて ◼ Dependency reviewについて ◼ 対象者 ◼ GHASって何?なひと ◼ 組織でのセキュリティに課題を抱えているひと ◼ GitHubを扱うすべてのひと
開発者として考えなくてはいけない セキュリティのこと 企画 要件 定義 設計 実装 リリース 運用 テスト
◼ 脆弱性に気をつける ◼ コードの脆弱性 ◼ 使用ライブラリ、パッケージの脆弱性 など 誰が どこで 設計、実装の段階からセキュリティを採用すること Shift Left テスト 開発者全員で意識!
None
GitHubはコード管理ツールだけじゃない GitHub Codespaces GitHub Actions GitHub Advanced Security GitHub Copilot
GHAS
GHASとは? ◼ GitHubが提供するセキュリティ機能群の総称 ◼ 一部すべてのプランで使用可能 ◼ プラスの機能を使いたい場合はGHASのライセンスを購入する必要あり ◼ GitHub Enterpriseプランが必要
◼ 主に3つの領域を中心に保護 ◼ サプライチェーン ◼ コード ◼ 環境 ◼ GitHubのプラン Free Team Enterprise ・ ・ ・
GHASの主な機能 Code Scanning Secret Scanning Dependency review (依存関係の確認) Private repository
with GHAS Private repository without GHAS Public repository
Shift security left with developer-first tools Commit changes Submit Pull
Request Update new branch Dependency Scanning: CVEの自動識別と修復 Secret Scanning: 公開されたトークンの検索と 無効化 Code Scanning: コード内の危険なパターンを 発見し警告する 新しいコードがメインブランチに導入される前に、 脆弱性を検出し、修正する
GHASの設定 ◼ Settings > Code security and analisys ◼ リポジトリ単位でも組織レベルでも設定で
きる ◼ 親階層の設定を継承する Enterprise Organizations Repo 各リポジトリ …
Code Scanning
Code Scanningとは ◼ コードを分析して、セキュリティの脆弱性と コーディングエラーを検出ことができる機能 ◼ コード解析エンジン「CodeQL」を利用している ◼ GitHub Actionsを利用して簡単に導入
◼ たくさんの言語がサポートされている ◼ C/C++ ◼ Java ◼ C# ◼ Python ◼ Go ◼ JavaScript ◼ TypeScript ◼ Ruby
セキュアじゃないコードをpushしてみる
Secret Scanning
Secret Scanningとは ◼ push後シークレットを検知したらアラートを出す ◼ GitHub→ユーザー、GitHub→サービスプロバイダーに通知 ◼ あらゆるプロバイダーのシークレットの形式をサポート ◼ カスタムパターンを作成可能
◼ 独自のシークレットを作成している場合に使用 ◼ 2023年2月にすべてのリポジトリで使用可能に!
シークレットをpushしてみる ◼ push後すぐアラートが出現 ◼ メールも届いた(届く設定にしているため) ◼ Security > Secret scanning
からアラートを確認
対処したらアラートはクローズしよう ◼ 対処方法が記載されてる ◼ 対処したらアラートはクローズする ◼ 取り消し ◼ テスト用 ◼
まちがい ◼ 修復しない
シークレットをpushできないようにする Commit changes Submit Pull Request Update new branch Secret
Scanning 新しいコードがメインブランチに導入される前に、 脆弱性を検出し、修正する Push protection ←プライベートリポジトリでは使えない ※2023年7月現在
Push protectionをonにしてpush
Dependency review
依存関係の確認ができるツールたち Dependency graph プロジェクトの依存関係を視覚化 Dependabot alerts コードの依存関係にある脆弱性を通知する Dependabot security updates
発見された脆弱性の修正案のPRを自動作成 Dependabot version updates 使用するパッケージのアップデートのPRを 自動作成 Dependency review PR上で依存関係の変更を視覚化 脆弱性の確認:GitHub Advisory Database GitHub によって脆弱性に関する情報が収集されるところ
Dependabot alerts
Dependabot security updates
Dependabot version updates
マージ前に脆弱性を検知したいなら… Commit changes Submit Pull Request Update new branch Dependency
review Dependabot 新しいコードがメインブランチに導入される前に、 脆弱性を検出し、修正する
Dependency review 脆弱性が検知されたら プルリクエストの段階 ではじかれる name: 'Dependency Review' on: [pull_request]
permissions: contents: read jobs: dependency-review: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' uses: actions/checkout@v3 - name: Dependency Review uses: actions/dependency-review-action@v3 .github/workflowsにワークフローを追加
まとめ ◼ 開発段階でセキュリティを意識する ◼ 全員が脆弱性を意識する ◼ 脆弱性自動検知ツールの導入おすすめ ◼ GHASはいいぞ
More Decks by Hirono Baba
See All by Hirono Baba
GitHub Dav Days Fukuoka/githubdavdaysfukuoka_20261017
nina01
0
66
GitHub Copilot App入門/aadojo13_20260930
nina01
0
76
Microsoft MVPになる前、なってから/Fukuoka_Tech_Women_Community_1_baba
nina01
0
380
Azure AI servicesと歯のおはなし/AzureTravelers_Fukuoka2024_baba
nina01
1
270
cloudugnight2nd-20240531
nina01
1
520
Azure犬駆動開発の記録/GlobalAzureFukuoka2024_20240420
nina01
1
500
Azure FunctionsのAOAIバインド機能を試してみる/dotnet2days20240118-baba
nina01
0
240
AzureでWaiting roomをつくる!新米アーキテクトの挑戦記/jazug-for-women-20231215-baba
nina01
1
1.1k
Azure Policyとガバナンスのおはなし/globalazure2023-baba
nina01
0
1.1k
Other Decks in Technology
See All in Technology
IoTのデータ保存をSREの観点で考える
grimoh
1
110
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
480
_マネジメントする人される人ナイト_2026__良いチームを作っていきたい_お気持ち_.pdf
xkxaxkx
0
840
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
6k
gradle-best-practices 使ってみた
mikanichinose
0
220
New Relicのアラート対応をClaude Codeで自動修正するワークフローを作った話
manabuseki
0
150
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
290
Context parameters で作る!はじめての型クラス
kworkdev
PRO
1
160
ノードが消える前提で設計する!Karpenterで金融システムを止めないためのノウハウ大全
daitak
1
180
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
230
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
130
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
830
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Discover your Explorer Soul
emna__ayadi
2
1.3k
The Art of Programming - Codeland 2020
erikaheidi
57
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
620
A designer walks into a library…
pauljervisheath
211
25k
Code Reviewing Like a Champion
maltzj
529
40k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610
Building Applications with DynamoDB
mza
96
7.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k