Maven / GitLab CI Basics Interview Questions
What are GitLab's built-in security scanning templates and how do you enable them?
GitLab provides built-in CI/CD templates for security scanning that can be included in any pipeline with a single line. These templates add jobs to your pipeline that scan for vulnerabilities without requiring manual configuration.
# Include GitLab security templates: include: - template: Security/SAST.gitlab-ci.yml # Static Application Security Testing - template: Security/Secret-Detection.gitlab-ci.yml # Detect secrets/tokens in code - template: Security/Dependency-Scanning.gitlab-ci.yml - template: Security/DAST.gitlab-ci.yml # Dynamic (requires running app) - template: Security/Container-Scanning.gitlab-ci.yml stages: - build - test - security # security templates add jobs to appropriate stages - deploy # These templates are maintained by GitLab and auto-update # Results appear in: # Secure > Vulnerability Report (GitLab Ultimate) # As MR security widgets (GitLab Ultimate) # SAST customisation: variables: SAST_EXCLUDED_PATHS: "spec,test,tests,tmp" # skip test directories SAST_EXCLUDED_ANALYZERS: "bandit" # skip specific analyzer # Secret Detection customisation: SECRET_DETECTION_EXCLUDED_PATHS: "tests/"
| Template | Scans for |
|---|---|
| SAST | Code vulnerabilities using static analysis |
| Secret Detection | Hardcoded secrets, API keys, passwords in code |
| Dependency Scanning | Known CVEs in project dependencies |
| DAST | Runtime vulnerabilities by attacking a live app |
| Container Scanning | CVEs in Docker image layers |
Security scanning results are visible in merge requests and the Vulnerability Report for GitLab Ultimate. For lower tiers, results appear in the job artifacts as JSON reports that can be parsed by other tools.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
