{"id":30116,"date":"2025-12-02T13:32:17","date_gmt":"2025-12-02T08:02:17","guid":{"rendered":"https:\/\/opstree.com\/blog\/?p=30116"},"modified":"2025-12-03T11:59:30","modified_gmt":"2025-12-03T06:29:30","slug":"how-github-advanced-security-solves-modern-devsecops-challenges","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2025\/12\/02\/how-github-advanced-security-solves-modern-devsecops-challenges\/","title":{"rendered":"How GitHub Advanced Security Solves Modern DevSecOps Challenges?"},"content":{"rendered":"<p>GitHub Advanced Security (GHAS) prevents leaked secrets, detects vulnerabilities, scans code for security flaws, protects the supply chain, and automates DevSecOps, all inside GitHub.<\/p>\n<div style=\"background: #f8fafc; padding: 18px; border: 1px solid #e2e8f0; border-radius: 6px; font-family: Inter, Arial, sans-serif;\">\n<h2 style=\"margin-top: 0; font-size: 18px;\">Table of Contents<\/h2>\n<ol style=\"margin: 0; padding-left: 18px; line-height: 1.6;\">\n<li><a style=\"text-decoration: none; color: #2563eb;\" href=\"#what-is-ghas\">What is GHAS?<\/a><\/li>\n<li><a style=\"text-decoration: none; color: #2563eb;\" href=\"#why-ghas\">Why GHAS?<\/a><\/li>\n<li><a style=\"text-decoration: none; color: #2563eb;\" href=\"#features-of-ghas\">Features of GHAS<\/a><\/li>\n<li><a style=\"text-decoration: none; color: #2563eb;\" href=\"#components-of-ghas\">Components of GHAS<\/a><\/li>\n<li><a style=\"text-decoration: none; color: #2563eb;\" href=\"#conclusion\">Conclusion<\/a><\/li>\n<li><a style=\"text-decoration: none; color: #2563eb;\" href=\"#references\">References<\/a><\/li>\n<\/ol>\n<\/div>\n<h2 id=\"what-is-ghas\">1. What is GHAS?<\/h2>\n<p>GitHub Advanced Security (GHAS) is a suite of built-in security capabilities designed to help software teams identify, prevent, and remediate security risks directly within GitHub.<!--more--><\/p>\n<p>It enhances the <a href=\"https:\/\/opstree.com\/blog\/2023\/06\/30\/how-is-devops-as-a-service-transforming-software-deliveries\/\">software development lifecycle<\/a> by integrating automated security testing into the developer workflow, ensuring vulnerabilities are caught early and remediated quickly.<\/p>\n<p>GHAS empowers organizations with advanced code analysis, secret exposure detection, and dependency vulnerability management &#8211; all without requiring additional external tools.<\/p>\n<h2 id=\"why-ghas\">2. Why GHAS?<\/h2>\n<p>Modern applications rely heavily on open-source libraries, automation, cloud services, and complex CI\/CD systems.<\/p>\n<p>This increases the risk of:<\/p>\n<ul>\n<li>Vulnerable code entering production<\/li>\n<li>Hardcoded secrets getting exposed<\/li>\n<li>Using outdated or vulnerable dependencies<\/li>\n<li>Insecure GitHub Actions workflows<\/li>\n<\/ul>\n<p><strong>GHAS helps solve these problems by:<\/strong><\/p>\n<ul>\n<li>Providing shift-left security<\/li>\n<li>Reducing reliance on multiple scattered tools<\/li>\n<li>Offering seamless GitHub integration<\/li>\n<li>Automating alerts, scanning, and remediation<\/li>\n<li>Improving developer productivity<\/li>\n<\/ul>\n<div style=\"border: 1px solid #d1d5db; padding: 16px; margin: 20px 0; background-color: #f0f4f8;\">\n<p style=\"margin: 0; font-weight: 600; font-size: 16px;\">Are you looking: <a href=\"https:\/\/opstree.com\/services\/devops-and-devsecops-services\/\">Shift-left security solutions<\/a><\/p>\n<\/div>\n<h2 id=\"features-of-ghas\">3. Features of GHAS<\/h2>\n<p>GHAS provides the following major capabilities:<\/p>\n<h3>Code Scanning (via CodeQL)<\/h3>\n<ul>\n<li>Performs static code analysis<\/li>\n<li>Detects vulnerabilities like SQL injection, XSS<\/li>\n<li>Runs via CLI, GitHub Actions, and API<\/li>\n<\/ul>\n<h3>Code Scanning PoC (CodeQL)<\/h3>\n<h5>Understanding CodeQL<\/h5>\n<p>CodeQL is the static analysis engine used by <strong>GitHub Advanced Security<\/strong> to detect security vulnerabilities in codebases.<\/p>\n<p>Developers can <strong>query code like a database<\/strong>, identifying patterns that could lead to:<\/p>\n<ul>\n<li>SQL injection<\/li>\n<li>XSS attacks<\/li>\n<li>Hardcoded secrets<\/li>\n<li>Lack of rate limiting<\/li>\n<li>Command injection &amp; more<\/li>\n<\/ul>\n<p>CodeQL scanning can be executed: Locally with CodeQL CLI<\/p>\n<ul>\n<li>On GitHub via CodeQL workflow<\/li>\n<li>Through <a href=\"https:\/\/opstree.com\/blog\/2024\/02\/27\/ci-cd-with-github-actions-concepts\/\">GitHub API<\/a><\/li>\n<\/ul>\n<h5>Objective of This PoC<\/h5>\n<ul>\n<li>Introduce vulnerable application code<\/li>\n<li>Configure CodeQL workflow in GitHub<\/li>\n<li>Trigger scan via push event<\/li>\n<li>Validate alerts shown in <strong>Security \u2192 Code Scanning<\/strong><\/li>\n<li>Apply secure fixes<\/li>\n<li>Confirm alerts marked <strong>resolved<\/strong> after mitigation<\/li>\n<\/ul>\n<h5>Repository Setup<\/h5>\n<p>Folder structure added:<\/p>\n<p>codeql-poc\/ \u2514\u2500\u2500 app.js<\/p>\n<p>Initial vulnerable code committed to repo.<\/p>\n<p>Repo: <a href=\"https:\/\/github.com\/himanshu0085\/ghas-poc\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/himanshu0085\/ghas-poc<\/a><\/p>\n<p><!-- notionvc: 7e90b9a1-eca7-4ea9-a96b-0f8de736f32c --><\/p>\n<p><!-- notionvc: 491fa655-089d-47f3-845a-acd1b0058270 --><\/p>\n<h5>Introducing Vulnerabilities<\/h5>\n<p><code>codeql-poc\/app.js<\/code> \u2014 intentionally insecure:<\/p>\n<ul>\n<li>SQL Injection<\/li>\n<li>Cross-Site Scripting (XSS)<\/li>\n<li>Hardcoded secret<\/li>\n<li>Missing rate limiting<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30117 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-2-1024x488.png\" alt=\"\" width=\"840\" height=\"400\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-2-1024x488.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-2-300x143.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-2-768x366.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-2-1200x572.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-2.png 1288w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h5>Enable CodeQL Code Scanning<\/h5>\n<ol>\n<li>Go to <strong>Security<\/strong> tab<\/li>\n<li>Under <strong>Code Scanning<\/strong>, Click <strong>Set up CodeQL<\/strong><\/li>\n<li>Select <strong>Default Configuration<\/strong><\/li>\n<li>Commit workflow file:<\/li>\n<\/ol>\n<p><code>.github\/workflows\/codeql.yml<\/code><\/p>\n<h5>Expected Alerts<\/h5>\n<p>After workflow runs, CodeQL will report vulnerabilities:<\/p>\n<div style=\"overflow-x: auto; margin: 20px 0;\">\n<table style=\"width: 100%; border-collapse: collapse; min-width: 550px; font-family: Inter, Arial, sans-serif;\">\n<thead>\n<tr style=\"background: #f1f5f9; text-align: left;\">\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Vulnerability<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Severity<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Expected Alert<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">SQL Injection<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">High<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">XSS<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Medium<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Hardcoded Secret<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">High<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Missing rate limiting<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Medium<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30149 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-26-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-26-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-26-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-26-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-26-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-26.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30150 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-27-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-27-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-27-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-27-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-27-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-27.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30151 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-28-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-28-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-28-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-28-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-28-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-28.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h5>Fixing Vulnerabilities<\/h5>\n<p>A secure version was created:<\/p>\n<p><code>codeql-poc\/app-secure.js<\/code><\/p>\n<p>Mitigations included:<\/p>\n<div style=\"overflow-x: auto; margin: 20px 0;\">\n<table style=\"width: 100%; border-collapse: collapse; min-width: 500px; font-family: Inter, Arial, sans-serif;\">\n<thead>\n<tr style=\"background: #f1f5f9; text-align: left;\">\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Issue Fixed<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Method Used<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">SQL Injection<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Parameterized query<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">XSS<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">HTML input escaping<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Hardcoded Secret<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Environment variables<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Missing Rate Limiting<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Added global rate limiter<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30152 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-29-1024x474.png\" alt=\"\" width=\"840\" height=\"389\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-29-1024x474.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-29-300x139.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-29-768x355.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-29-1200x555.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-29.png 1284w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30153 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-30-1024x474.png\" alt=\"\" width=\"840\" height=\"389\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-30-1024x474.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-30-300x139.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-30-768x355.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-30-1200x555.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-30.png 1284w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30154 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-31-1024x474.png\" alt=\"\" width=\"840\" height=\"389\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-31-1024x474.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-31-300x139.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-31-768x355.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-31-1200x555.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-31.png 1284w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30155 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-32-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-32-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-32-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-32-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-32-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-32.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><span style=\"font-size: 19px; font-weight: 900;\">Alert Resolution<\/span><\/p>\n<p>After remediation push:<\/p>\n<ul>\n<li>CodeQL rescans automatically<\/li>\n<li>Alerts update to <strong>Resolved<\/strong> or can be manually closed<\/li>\n<li>Select valid closure reason (e.g., \u201cFixed\u201d)<\/li>\n<\/ul>\n<h5>Best Practices<\/h5>\n<ul>\n<li>Enable <strong>branch protection rules<\/strong> to block merging vulnerable code<\/li>\n<li>Use <strong>Copilot Security<\/strong> to auto-fix common vulnerabilities<\/li>\n<li>Expand CodeQL queries for custom security rules<\/li>\n<li>Include CodeQL scans in all <a href=\"https:\/\/www.buildpiper.io\/secure-pipelines\/\" target=\"_blank\" rel=\"noopener\">CI\/CD pipelines<\/a><\/li>\n<li>Monitor Security dashboard for regression alerts<\/li>\n<\/ul>\n<h3>Secret Scanning<\/h3>\n<ul>\n<li>Real-time detection of exposed credentials<\/li>\n<li>Flags secrets such as API keys, tokens, private keys<\/li>\n<\/ul>\n<h5>Secret Scanning PoC<\/h5>\n<h5>Understanding Secret Scanning<\/h5>\n<p>Secret Scanning is a GitHub Advanced Security (GHAS) capability that automatically identifies exposed credentials inside a repository. GitHub scans:<\/p>\n<ul>\n<li>Commits<\/li>\n<li>Branches<\/li>\n<li>Pull Requests<\/li>\n<li>Issues<\/li>\n<li>Wikis<\/li>\n<li>Discussions<\/li>\n<\/ul>\n<p>When a supported secret pattern is detected, GitHub generates an alert under:<\/p>\n<ul>\n<li><strong>Security \u2192 Secret Scanning<\/strong><\/li>\n<\/ul>\n<p>This PoC demonstrates adding sample secrets, pushing them to GitHub, observing the alerts, and documenting the workflow.<\/p>\n<h5>Objective of This PoC<\/h5>\n<ul>\n<li>Create a single file containing multiple credential patterns<\/li>\n<li>Push the file to a public repository<\/li>\n<li>Trigger secret-scanning alerts<\/li>\n<li>Validate and record alert details through screenshots<\/li>\n<li>Understand how alerts are reviewed and resolved<\/li>\n<\/ul>\n<h5>Repository Setup<\/h5>\n<ul>\n<li>Create a dedicated folder in your repository:<\/li>\n<li><code>secret-scanning-poc\/<br \/>\n<\/code><\/li>\n<li>Inside it, create one file:<\/li>\n<li><code>secret-scanning.txt<\/code><!-- notionvc: 4ebf2148-b2dd-4e45-8903-c7511a1ad6e0 --><\/li>\n<\/ul>\n<h5>Content for <code>secret-scanning.txt<\/code><\/h5>\n<p>Paste the following sample secrets into the file:<\/p>\n<p><code>ghp_FAKEPAT1234567890abcdefghijklmnopqrstuvwxyz12<br \/>\nAKIA1234567890FAKEKEY<br \/>\nsk_test_4eC39HqLyjWDarjtT1zdp7dc<br \/>\n<\/code><!-- notionvc: fc1ad00d-5280-4ead-8f07-3d5518086eef --><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30128 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-10-1024x549.png\" alt=\"\" width=\"840\" height=\"450\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-10-1024x549.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-10-300x161.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-10-768x411.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-10-1200x643.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-10.png 1288w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<ul>\n<li>Commit and push the file to the <strong>main<\/strong> branch.<\/li>\n<li>This file will be used to demonstrate GitHub&#8217;s Secret Scanning feature.<!-- notionvc: 831f038d-396a-404e-a0a6-b9662aa7d112 --><\/li>\n<\/ul>\n<h5>Enable Secret Scanning<\/h5>\n<ul>\n<li>Before detection begins, ensure Secret Scanning is enabled for the repository.<\/li>\n<\/ul>\n<ol>\n<li>\n<h6><strong>Go to repository Settings<\/strong><\/h6>\n<\/li>\n<li>\n<h6><strong>Navigate to \u201cCode security and analysis\u201d \/ \u201cAdvanced Security\u201d<\/strong><\/h6>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30129 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-11-1024x491.png\" alt=\"\" width=\"840\" height=\"403\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-11-1024x491.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-11-300x144.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-11-768x368.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-11-1200x575.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-11.png 1292w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h6><strong>3. Under \u201cSecret Protection\u201d, enable:<\/strong><\/h6>\n<ul>\n<li><strong>Secret scanning<\/strong><!-- notionvc: 3e68b586-3cfe-4ff1-a050-9a55b3777b22 --><!-- notionvc: 03e3f9b3-7f4a-42c2-ba03-e0e3bfc50332 --><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30130 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-12-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-12-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-12-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-12-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-12-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-12.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30131 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-13-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-13-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-13-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-13-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-13-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-13.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<ul>\n<li><span class=\"notion-enable-hover\" data-token-index=\"0\">(Optional)<\/span> <span class=\"notion-enable-hover\" data-token-index=\"2\">Push protection<\/span> <!-- --> <!-- notionvc: 2edeb62c-348f-44f6-b3f5-13d3351bb7f0 --><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30132 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-14-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-14-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-14-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-14-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-14-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-14.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<ul>\n<li>Once enabled, GitHub will automatically scan <span class=\"notion-enable-hover\" data-token-index=\"1\">new commits<\/span> for exposed secrets.<!-- notionvc: 58dac7dd-7f11-44bb-88c7-6c36028559f6 --><\/li>\n<\/ul>\n<h5>Expected Flow<\/h5>\n<ol>\n<li>After enabling the feature, go to the <strong>Security<\/strong> tab in your repository<!-- notionvc: eeddfa1e-f1b4-47a3-a74c-98026e972b9b --><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30133 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-15-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-15-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-15-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-15-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-15-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-15.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<ol start=\"2\">\n<li>GitHub scans the newly pushed content<\/li>\n<li>Secret alerts appear under <strong>Security \u2192 Secret Scanning<\/strong><!-- notionvc: 6736b4cb-3c6a-44ad-bd48-ef8194b604db --><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30134 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-16-1024x656.png\" alt=\"\" width=\"840\" height=\"538\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-16-1024x656.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-16-300x192.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-16-768x492.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-16-1200x769.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-16.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<ol start=\"4\">\n<li>You will validate alerts and capture screenshots<\/li>\n<li>Alerts can then be marked as <strong>resolved<\/strong>, <strong>revoked<\/strong>, or <strong>dismissed<\/strong><!-- notionvc: 06c5045b-4ccb-455f-9277-5ead08017c35 --><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30135 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-17-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-17-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-17-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-17-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-17-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-17.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h5>Closure Reasons Explained<\/h5>\n<p>GitHub requires selecting a valid reason before marking alerts as resolved:<\/p>\n<p><!-- notionvc: e3171a93-dbdc-47eb-87cc-640125f10aca --><\/p>\n<ul>\n<li style=\"overflow-x: auto;\">\n<table style=\"width: 100%; border-collapse: collapse; min-width: 600px; font-family: Inter, Arial, sans-serif;\">\n<thead>\n<tr style=\"background: #f1f5f9; text-align: left;\">\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Close Reason<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">When to Use It<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">What It Means<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\"><span class=\"notion-enable-hover\" data-token-index=\"0\">Revoked<\/span><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">When the leaked secret is invalidated or rotated<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Secret cannot be exploited anymore<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\"><span class=\"notion-enable-hover\" data-token-index=\"0\">Used in tests<\/span><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Demo\/sandbox\/testing credentials only<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">No real risk to production<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\"><span class=\"notion-enable-hover\" data-token-index=\"0\">False positive<\/span><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Detection is incorrect<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Not actually a real secret<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\"><span class=\"notion-enable-hover\" data-token-index=\"0\">Won\u2019t fix<\/span><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Accepted risk in PoC\/demo<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">No remediation needed &#8211; but risky if used in production<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<h5>Best Practices<\/h5>\n<ul>\n<li>Always rotate real secrets immediately<\/li>\n<li>Use <strong>\u201cUsed in tests\u201d<\/strong> only for intentionally fake\/testing keys<\/li>\n<li>Use <strong>\u201cFalse positive\u201d<\/strong> only when 100% sure<\/li>\n<li>Avoid <strong>\u201cWon\u2019t fix\u201d<\/strong> unless in a safe PoC environment<\/li>\n<li><!-- notionvc: 7e617f20-e2f2-4fec-a977-1d7ad0c482c7 --><\/li>\n<\/ul>\n<h5>Dependency Management (Dependabot)<\/h5>\n<ul>\n<li>Detects vulnerable dependencies<\/li>\n<li>Suggests or auto-generates PRs to update libraries<!-- notionvc: 25bcb0fe-c8e6-48b7-9862-9d2f2b65343d --><\/li>\n<\/ul>\n<h5>Dependabot (Dependency Scanning) PoC<\/h5>\n<h5>What is Dependency Scanning?<\/h5>\n<p>GitHub Dependabot scans dependencies for known vulnerabilities using the <strong>GitHub Advisory Database<\/strong>.<\/p>\n<p>It:<\/p>\n<ul>\n<li>Detects security vulnerabilities (CVEs)<\/li>\n<li>Alerts the developer in GitHub Security tab<\/li>\n<li>Suggests or auto-creates PRs to upgrade packages<\/li>\n<\/ul>\n<h5>Objective of This PoC<\/h5>\n<ul>\n<li>Introduce <strong>vulnerable npm dependencies<\/strong><\/li>\n<li>Trigger Dependabot alerts<\/li>\n<li>Apply recommended fixes via PR<\/li>\n<li>Validate remediation in GitHub UI<\/li>\n<\/ul>\n<h5>Repository Setup<\/h5>\n<ul>\n<li>Create new folder inside repo:<\/li>\n<li>ghas-poc\/ \u2514\u2500\u2500 dependabot-poc\/ \u251c\u2500\u2500 package.json \u2514\u2500\u2500 index.js<\/li>\n<li>Initialize a basic Node.js project:<\/li>\n<\/ul>\n<p><!-- notionvc: 7eb3d7cf-8b6d-47ae-b5ce-27f4cf27fef1 --><\/p>\n<p><code>cd dependabot-poc<br \/>\nnpm init -y<br \/>\n<\/code><\/p>\n<p><!-- notionvc: 3f6781d2-4e43-4a86-af40-6565ebbe3123 --><\/p>\n<h5>Add Vulnerable Dependencies<\/h5>\n<p>Edit &#8211; <span class=\"notion-enable-hover\" spellcheck=\"false\" data-token-index=\"1\">package.json<\/span>:<\/p>\n<ul>\n<li style=\"background: #1e1e1e; border-radius: 6px; overflow-x: auto; font-family: 'Courier New', monospace; color: #d4d4d4;\">{<br \/>\n&#8220;name&#8221;: &#8220;dependabot-poc&#8221;,<br \/>\n&#8220;version&#8221;: &#8220;1.0.0&#8221;,<br \/>\n&#8220;dependencies&#8221;: {<br \/>\n&#8220;lodash&#8221;: &#8220;4.17.19&#8221;,<br \/>\n&#8220;axios&#8221;: &#8220;0.21.0&#8221;<br \/>\n}<br \/>\n}Create `index.js`:&#8220;`javascript<br \/>\nconsole.log(&#8220;Dependabot scanning PoC running&#8230;&#8221;);<\/li>\n<li style=\"background: #1e1e1e; border-radius: 6px; overflow-x: auto; font-family: 'Courier New', monospace; color: #d4d4d4;\">\n<pre style=\"margin: 0; white-space: pre;\">git add .\r\ngit commit -m \"Added vulnerable dependencies for Dependabot PoC\"\r\ngit push\r\n<\/pre>\n<\/li>\n<\/ul>\n<h5>Enable Dependabot Security Updates<\/h5>\n<p>Go to: <strong>Settings \u2192 Code security and analysis<\/strong><\/p>\n<p>Enable:<\/p>\n<ul>\n<li><strong>Dependabot alerts<\/strong><\/li>\n<li><strong>Dependabot security updates<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30136 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-18-1024x491.png\" alt=\"\" width=\"840\" height=\"403\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-18-1024x491.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-18-300x144.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-18-768x368.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-18-1200x575.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-18.png 1292w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30137 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-19-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-19-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-19-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-19-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-19-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-19.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h5>Expected Alerts<\/h5>\n<p>Dependabot will detect two vulnerabilities:<!-- notionvc: e641363e-cb66-4ade-90b5-9ad0e635c0a4 --><\/p>\n<ul>\n<li style=\"overflow-x: auto;\">\n<table style=\"width: 100%; border-collapse: collapse; min-width: 900px; font-family: Inter, Arial, sans-serif;\">\n<thead>\n<tr style=\"background: #f1f5f9; text-align: left;\">\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Package<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Version<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Issue<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Severity<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">lodash<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">4.17.19<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Prototype Pollution<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">\u274c High<!-- notionvc: 7d7e2d70-858c-48a1-bbee-7fe1a8a057ac --><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Upgrade to \u2265 4.17.21<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">axios<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">0.21.0<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">SSRF Vulnerability<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">\u274c High<!-- notionvc: 7d7e2d70-858c-48a1-bbee-7fe1a8a057ac --><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Upgrade to \u2265 0.21.1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<p>View them in:<\/p>\n<p><span class=\"notion-enable-hover\" data-token-index=\"1\">Security \u2192 Dependabot \u2192 Alerts<\/span><!-- notionvc: 92759677-cdfd-4e6c-bc3e-e5e6bcbaee34 --><br \/>\n<!-- notionvc: 8f7ff522-caf1-49ea-82d7-ca8ef9839dfc --><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30138 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-20-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-20-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-20-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-20-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-20-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-20.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30139 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-21-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-21-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-21-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-21-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-21-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-21.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h5>Apply Auto-Fix via Dependabot PR<\/h5>\n<p>Dependabot will automatically generate:<\/p>\n<ul>\n<li>PR #1 &#8211; Upgrade <strong>lodash<\/strong><\/li>\n<li>PR #2 &#8211; Upgrade <strong>axios<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30140 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-22-1024x484.png\" alt=\"\" width=\"840\" height=\"397\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-22-1024x484.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-22-300x142.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-22-768x363.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-22-1200x568.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-22.png 1300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30141 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-23-1024x555.png\" alt=\"\" width=\"840\" height=\"455\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-23-1024x555.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-23-300x163.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-23-768x416.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-23.png 1056w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Your tasks:<\/p>\n<ul>\n<li>Review both PRs<\/li>\n<li>Merge to the main branch<\/li>\n<li>Confirm GitHub checks pass<!-- notionvc: c71ae18c-4884-4506-89bc-dbf90128cbb6 --><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30142 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-24-1024x537.png\" alt=\"\" width=\"840\" height=\"441\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-24-1024x537.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-24-300x157.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-24-768x403.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-24.png 1075w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>After merging:<\/p>\n<ul>\n<li>Alerts marked <strong>Resolved<\/strong><\/li>\n<li>Dependency tree becomes secure<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30143 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-25-1024x482.png\" alt=\"\" width=\"840\" height=\"395\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-25-1024x482.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-25-300x141.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-25-768x362.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-25-1200x565.png 1200w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/image-25.png 1270w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h5>Best Practices<\/h5>\n<ul>\n<li style=\"overflow-x: auto;\">\n<table style=\"width: 100%; border-collapse: collapse; min-width: 450px; font-family: Inter, Arial, sans-serif;\">\n<thead>\n<tr style=\"background: #f1f5f9; text-align: left;\">\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Best Practice<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Why<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Monitor alerts daily<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Faster remediation<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Enable auto-security updates<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Avoid outdated dependencies<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Apply least privilege to workflows<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Reduce dependency-based attacks<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Use version pinning<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Prevent unexpected breaking changes<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Combine with CodeQL + Secret Scanning<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Full SDLC protection<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<h5>Conclusion<\/h5>\n<ul>\n<li>This PoC confirms:<\/li>\n<li>Dependabot correctly identified vulnerable dependencies<\/li>\n<li>Alerts were visible inside GitHub Security Dashboard<\/li>\n<li>Auto-generated PRs patched vulnerabilities<\/li>\n<li>The application security posture improved<\/li>\n<\/ul>\n<h2>4. Components of GHAS<\/h2>\n<ul>\n<li style=\"overflow-x: auto;\">\n<div style=\"overflow-x: auto; margin: 20px 0;\">\n<table style=\"width: 100%; border-collapse: collapse; min-width: 650px; font-family: Inter, Arial, sans-serif;\">\n<thead>\n<tr style=\"background: #f1f5f9; text-align: left;\">\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Component<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Description<\/th>\n<th style=\"padding: 12px; border: 1px solid #e2e8f0;\">Key Capabilities<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\"><span class=\"notion-enable-hover\" data-token-index=\"0\">Code Scanning (CodeQL)<\/span><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Static code analysis using semantic queries<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Finds vulnerabilities, supports multiple languages<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\"><span class=\"notion-enable-hover\" data-token-index=\"0\">Secret Scanning<\/span><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Detects credentials committed to code<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Alerts developers, supports custom patterns<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\"><span class=\"notion-enable-hover\" data-token-index=\"0\">Dependency Management (Dependabot)<\/span><\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Scans for vulnerable libraries<\/td>\n<td style=\"padding: 12px; border: 1px solid #e2e8f0;\">Creates automated PRs for fixes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/li>\n<\/ul>\n<h2>5. Conclusion<br \/>\n<!-- notionvc: 99788e7e-6b1c-495e-a60d-b95a4c8ea996 --><\/h2>\n<p>GitHub Advanced Security (GHAS) provides a powerful, developer-friendly security solution natively integrated into GitHub.<\/p>\n<p>By combining CodeQL scanning, secret detection, and dependency management, GHAS enables teams to secure their codebases efficiently and proactively.<\/p>\n<ul>\n<li>GHAS improves:<\/li>\n<li>Code quality<\/li>\n<li>Security posture<\/li>\n<li>Developer productivity<\/li>\n<li>Compliance readiness<\/li>\n<\/ul>\n<p>It helps organizations implement true <strong>shift-left security<\/strong> and reduces dependency on external tools.<\/p>\n<p><!-- notionvc: b5b3eb2f-37b1-4390-a7a9-e03b9263c5b8 --><\/p>\n<h2>6. References<\/h2>\n<ul>\n<li>GitHub Advanced Security Documentation <a href=\"https:\/\/docs.github.com\/en\/code-security\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.github.com\/en\/code-security<\/a><\/li>\n<li>CodeQL Documentation <a href=\"https:\/\/codeql.github.com\/docs\/\" target=\"_blank\" rel=\"noopener\">https:\/\/codeql.github.com\/docs\/<\/a><\/li>\n<li>GitHub REST API Security Docs<a href=\"https:\/\/docs.github.com\/en\/rest\" target=\"_blank\" rel=\"noopener\"> https:\/\/docs.github.com\/en\/rest<\/a><\/li>\n<li>GitHub Actions Security Guide <a href=\"https:\/\/docs.github.com\/en\/actions\/security-guides\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.github.com\/en\/actions\/security-guides<\/a><!-- notionvc: e41d03b1-a6b2-4f47-bb61-84029d3e7a9a --><!-- notionvc: 03187899-6e9c-43c2-a3dc-a1ba197be514 --><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>GitHub Advanced Security (GHAS) prevents leaked secrets, detects vulnerabilities, scans code for security flaws, protects the supply chain, and automates DevSecOps, all inside GitHub. Table of Contents What is GHAS? Why GHAS? Features of GHAS Components of GHAS Conclusion References 1. What is GHAS? GitHub Advanced Security (GHAS) is a suite of built-in security capabilities &hellip; <a href=\"https:\/\/opstree.com\/blog\/2025\/12\/02\/how-github-advanced-security-solves-modern-devsecops-challenges\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How GitHub Advanced Security Solves Modern DevSecOps Challenges?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":244582712,"featured_media":30145,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[28070474],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/12\/GitHub-Advanced-Security-Solves-Modern-DevSecOps.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-7PK","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/30116"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/244582712"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=30116"}],"version-history":[{"count":10,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/30116\/revisions"}],"predecessor-version":[{"id":30158,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/30116\/revisions\/30158"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/30145"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=30116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=30116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=30116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}