<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic From Code to Compliance - Mastering Security in GitLab in Software - General</title>
    <link>https://community.hpe.com/t5/software-general/from-code-to-compliance-mastering-security-in-gitlab/m-p/7257943#M1415</link>
    <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;In today’s world, security can’t wait until production. Every commit, every merge, every pipeline needs to be safe from start to deploy. That’s where GitLab Security steps in.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Instead of juggling third-party scanners and external dashboards, GitLab bakes DevSecOps right into your CI/CD pipeline.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Introduction&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;As software security becomes increasingly important, many companies want to introduce standard code scanning processes into development workflows to find and remediate security vulnerabilities before they get to production. GitLab's DevSecOps Platform allows users to perform security scans in CI/CD pipelines, which can easily be enabled to check applications for security vulnerabilities such as unauthorized access, data leaks, and denial of service (DoS) attacks.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;GitLab automatically scans your applications for potential security threats such as:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Unauthorized access.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Data leaks.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Denial of Service (DoS) attacks.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Gitlab Provides Variety of Security scans and Reporting Features&amp;nbsp; Which are Listed Below,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Security Scanning:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table.png" style="width: 725px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152700iBC104451BB34B1E2/image-size/large?v=v2&amp;amp;px=2000" role="button" title="table.png" alt="table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Reporting Features:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security Reports&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Vulnerability Management&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Policies&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Security Policies:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;GitLab Security Policies are rule-based configurations that allow you to define security behaviour across your projects. Think of them as a security automation layer that controls:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;When to run scans (like SAST, DAST, Secret Detection)&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;What happens when vulnerabilities are found&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Who must approve risky changes&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;How license violations are handled&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security policies are stored as YAML files inside your GitLab repository (typically under .gitlab/security-policies/), making them version-controlled, auditable, and portable.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security policies are part of GitLab’s Ultimate tier, which unlocks advanced security and compliance features, including:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Group-wide policy enforcement&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security Dashboards&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Compliance Pipelines&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Audit Logs&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Example use case:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Let’s also investigate a real-time example&lt;/STRONG&gt;, a FinTech company called &lt;STRONG&gt;PayWave&lt;/STRONG&gt; that wants to enforce strict security in its development process. Using GitLab &lt;STRONG&gt;Security Policies&lt;/STRONG&gt;, PayWave defines YAML-based rules that automatically run SAST and Secret Detection scans on every merge request, block merges if critical vulnerabilities are found, and require approval from the security team before proceeding.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Additionally, a license compliance policy prevents merging any code that introduces dependencies with disallowed licenses, such as GPL-3.0. This setup ensures that all code changes are scanned, reviewed, and compliant with the company’s security and legal standards—automating governance and reducing human error.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Types of Security Policies Offered by Gitlab&lt;/STRONG&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Scan Execution Policies&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;These define when security scans should run and under what conditions. For example, you can run SAST and Secret Detection only on protected branches, or during merge requests.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Example use cases:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Always run SAST on main and dev&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Run container scanning only on Docker file changes&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Let’s also investigate a&lt;/STRONG&gt; &lt;STRONG&gt;real-time example&lt;/STRONG&gt;, Imagine you’re working on a school management app ,You can set a policy to run Secret Detection whenever someone updates the &lt;EM&gt;login module&lt;/EM&gt;, to make sure no passwords or tokens are accidentally exposed.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;And you can run Dependency Scanning only when the &lt;EM&gt;requirements.txt&lt;/EM&gt; (for Python) or &lt;EM&gt;pom.xml&lt;/EM&gt; (for Java) file changes since that’s where new libraries are added. This way, scans run only when it truly matters keeping your pipelines faster, smarter, and secure.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Scan Result Policies&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;These enforce rules based on scan results — such as blocking a merge request if critical vulnerabilities are found or requiring approval from a security team before merging.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Example use cases:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Block MR if SAST finds critical severity issues&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Require approval if any high-severity DAST finding is present.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Let’s also investigate a&lt;/STRONG&gt; &lt;STRONG&gt;real-time example&lt;/STRONG&gt;, a healthcare startup can use a &lt;STRONG&gt;Scan Result Policy&lt;/STRONG&gt; to automatically block a merge request if Dependency Scanning detects libraries with known high-severity vulnerabilities. It can also require security team approval if DAST finds any issues that could expose patient data. This ensures no risky code is merged without proper review and maintains compliance with data protection standards.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Running SAST Scan on .py Code and Accessing/Analysing Vulnerability Reports:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Navigate to your GitLab project, create a CI/CD configuration file .gitlab-ci.yml and include a SAST scan template at the end of your CI/CD configuration yaml and add some .py code files with intended vulnerable code for testing and validation vulnerability reports and commit the files.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="snippet.png" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152693i5F9F63075A26D511/image-size/large?v=v2&amp;amp;px=2000" role="button" title="snippet.png" alt="snippet.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2. Now on left side menu go to build -&amp;gt; pipelines and click on the running pipeline and wait for to finish as shown in below image. ( figure 1.1 )&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.1.jpg" style="width: 632px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152692i56AEA288045815E5/image-dimensions/632x232?v=v2" width="632" height="232" role="button" title="fig 1.1.jpg" alt="fig 1.1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Figure 1.1&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.2.jpg" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152694i9DC34993928F9753/image-size/large?v=v2&amp;amp;px=2000" role="button" title="fig 1.2.jpg" alt="fig 1.2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&amp;nbsp;Figure 1.2&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Once the pipeline completes execution go to Vulnerability reports on the left side menu and you will find the list of vulnerabilities found and click on each to view the details. ( Figure 1.3)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.3.jpg" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152695i1B4B7106543F0E13/image-size/large?v=v2&amp;amp;px=2000" role="button" title="fig 1.3.jpg" alt="fig 1.3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Figure 1.3&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.4.jpg" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152696i1C474D298B30F076/image-size/large?v=v2&amp;amp;px=2000" role="button" title="fig 1.4.jpg" alt="fig 1.4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Figure 1.4&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;GitLab Security empowers teams to build trust into their software from the very first commit.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;By embedding DevSecOps directly into the CI/CD pipeline, it ensures vulnerabilities are caught early not after release. From SAST, DAST, and dependency scanning to container and secret detection, GitLab provides a unified approach to securing your entire software lifecycle.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security is no longer a separate stage it’s a continuous, automated process built right into your workflow.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Final Verdict&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;In an era where every second counts and every breach matters, GitLab Security delivers proactive protection without slowing down development. It transforms your pipelines into smart, self-defending systems that find and fix issues before they ever reach production. For teams embracing true DevSecOps, GitLab isn’t just a tool it’s your all-in-one security partner that keeps innovation fast and fearless.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;“Code with confidence. Deploy without fear. GitLab’s got your security covered”&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Lekhasri Venugopal&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hewlette Packard(PSD-GCC)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Oct 2025 11:50:34 GMT</pubDate>
    <dc:creator>lekhasri</dc:creator>
    <dc:date>2025-10-31T11:50:34Z</dc:date>
    <item>
      <title>From Code to Compliance - Mastering Security in GitLab</title>
      <link>https://community.hpe.com/t5/software-general/from-code-to-compliance-mastering-security-in-gitlab/m-p/7257943#M1415</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;In today’s world, security can’t wait until production. Every commit, every merge, every pipeline needs to be safe from start to deploy. That’s where GitLab Security steps in.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Instead of juggling third-party scanners and external dashboards, GitLab bakes DevSecOps right into your CI/CD pipeline.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Introduction&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;As software security becomes increasingly important, many companies want to introduce standard code scanning processes into development workflows to find and remediate security vulnerabilities before they get to production. GitLab's DevSecOps Platform allows users to perform security scans in CI/CD pipelines, which can easily be enabled to check applications for security vulnerabilities such as unauthorized access, data leaks, and denial of service (DoS) attacks.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;GitLab automatically scans your applications for potential security threats such as:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Unauthorized access.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Data leaks.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Denial of Service (DoS) attacks.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Gitlab Provides Variety of Security scans and Reporting Features&amp;nbsp; Which are Listed Below,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Security Scanning:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table.png" style="width: 725px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152700iBC104451BB34B1E2/image-size/large?v=v2&amp;amp;px=2000" role="button" title="table.png" alt="table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Reporting Features:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security Reports&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Vulnerability Management&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Policies&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Security Policies:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;GitLab Security Policies are rule-based configurations that allow you to define security behaviour across your projects. Think of them as a security automation layer that controls:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;When to run scans (like SAST, DAST, Secret Detection)&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;What happens when vulnerabilities are found&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Who must approve risky changes&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;How license violations are handled&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security policies are stored as YAML files inside your GitLab repository (typically under .gitlab/security-policies/), making them version-controlled, auditable, and portable.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security policies are part of GitLab’s Ultimate tier, which unlocks advanced security and compliance features, including:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Group-wide policy enforcement&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security Dashboards&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Compliance Pipelines&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Audit Logs&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Example use case:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Let’s also investigate a real-time example&lt;/STRONG&gt;, a FinTech company called &lt;STRONG&gt;PayWave&lt;/STRONG&gt; that wants to enforce strict security in its development process. Using GitLab &lt;STRONG&gt;Security Policies&lt;/STRONG&gt;, PayWave defines YAML-based rules that automatically run SAST and Secret Detection scans on every merge request, block merges if critical vulnerabilities are found, and require approval from the security team before proceeding.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Additionally, a license compliance policy prevents merging any code that introduces dependencies with disallowed licenses, such as GPL-3.0. This setup ensures that all code changes are scanned, reviewed, and compliant with the company’s security and legal standards—automating governance and reducing human error.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Types of Security Policies Offered by Gitlab&lt;/STRONG&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Scan Execution Policies&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;These define when security scans should run and under what conditions. For example, you can run SAST and Secret Detection only on protected branches, or during merge requests.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Example use cases:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Always run SAST on main and dev&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Run container scanning only on Docker file changes&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Let’s also investigate a&lt;/STRONG&gt; &lt;STRONG&gt;real-time example&lt;/STRONG&gt;, Imagine you’re working on a school management app ,You can set a policy to run Secret Detection whenever someone updates the &lt;EM&gt;login module&lt;/EM&gt;, to make sure no passwords or tokens are accidentally exposed.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;And you can run Dependency Scanning only when the &lt;EM&gt;requirements.txt&lt;/EM&gt; (for Python) or &lt;EM&gt;pom.xml&lt;/EM&gt; (for Java) file changes since that’s where new libraries are added. This way, scans run only when it truly matters keeping your pipelines faster, smarter, and secure.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Scan Result Policies&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;These enforce rules based on scan results — such as blocking a merge request if critical vulnerabilities are found or requiring approval from a security team before merging.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Example use cases:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Block MR if SAST finds critical severity issues&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Require approval if any high-severity DAST finding is present.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Let’s also investigate a&lt;/STRONG&gt; &lt;STRONG&gt;real-time example&lt;/STRONG&gt;, a healthcare startup can use a &lt;STRONG&gt;Scan Result Policy&lt;/STRONG&gt; to automatically block a merge request if Dependency Scanning detects libraries with known high-severity vulnerabilities. It can also require security team approval if DAST finds any issues that could expose patient data. This ensures no risky code is merged without proper review and maintains compliance with data protection standards.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Running SAST Scan on .py Code and Accessing/Analysing Vulnerability Reports:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Navigate to your GitLab project, create a CI/CD configuration file .gitlab-ci.yml and include a SAST scan template at the end of your CI/CD configuration yaml and add some .py code files with intended vulnerable code for testing and validation vulnerability reports and commit the files.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="snippet.png" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152693i5F9F63075A26D511/image-size/large?v=v2&amp;amp;px=2000" role="button" title="snippet.png" alt="snippet.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2. Now on left side menu go to build -&amp;gt; pipelines and click on the running pipeline and wait for to finish as shown in below image. ( figure 1.1 )&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.1.jpg" style="width: 632px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152692i56AEA288045815E5/image-dimensions/632x232?v=v2" width="632" height="232" role="button" title="fig 1.1.jpg" alt="fig 1.1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Figure 1.1&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.2.jpg" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152694i9DC34993928F9753/image-size/large?v=v2&amp;amp;px=2000" role="button" title="fig 1.2.jpg" alt="fig 1.2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&amp;nbsp;Figure 1.2&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Once the pipeline completes execution go to Vulnerability reports on the left side menu and you will find the list of vulnerabilities found and click on each to view the details. ( Figure 1.3)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.3.jpg" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152695i1B4B7106543F0E13/image-size/large?v=v2&amp;amp;px=2000" role="button" title="fig 1.3.jpg" alt="fig 1.3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Figure 1.3&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fig 1.4.jpg" style="width: 602px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/152696i1C474D298B30F076/image-size/large?v=v2&amp;amp;px=2000" role="button" title="fig 1.4.jpg" alt="fig 1.4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Figure 1.4&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;GitLab Security empowers teams to build trust into their software from the very first commit.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;By embedding DevSecOps directly into the CI/CD pipeline, it ensures vulnerabilities are caught early not after release. From SAST, DAST, and dependency scanning to container and secret detection, GitLab provides a unified approach to securing your entire software lifecycle.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Security is no longer a separate stage it’s a continuous, automated process built right into your workflow.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Final Verdict&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;In an era where every second counts and every breach matters, GitLab Security delivers proactive protection without slowing down development. It transforms your pipelines into smart, self-defending systems that find and fix issues before they ever reach production. For teams embracing true DevSecOps, GitLab isn’t just a tool it’s your all-in-one security partner that keeps innovation fast and fearless.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;“Code with confidence. Deploy without fear. GitLab’s got your security covered”&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Lekhasri Venugopal&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hewlette Packard(PSD-GCC)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 11:50:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-general/from-code-to-compliance-mastering-security-in-gitlab/m-p/7257943#M1415</guid>
      <dc:creator>lekhasri</dc:creator>
      <dc:date>2025-10-31T11:50:34Z</dc:date>
    </item>
  </channel>
</rss>

