About glab-security
A guide to configuring GitLab project security features with glab, including enabling, disabling, and checking scan profiles. The command surface is experimental, so its current help output should be checked before production automation.
Key features
- 01Enable or disable scan profiles
- 02Inspect profile status
- 03Target projects with a repository option
- 04Examples for dependency scanning and SAST
- 05Confirm permissions and targets before changes
Use cases
- 01Enable SAST for a GitLab project
- 02Check a project's dependency scanning setup
- 03Specify repositories explicitly in automation
- 04Verify scan status before and after changes
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ vince-winkintel/ gitlab-cli-skills --skill glab-securityAfter installing, type/glab-securityin Claude Code to confirm it loaded.
Bundled filesreferences/commands.md
Details
From the project READMEglab security
Configure GitLab security features for a project.
Experimental upstream command surface: verify live
glab security --helpbefore relying on it in production automation.
Common commands
# Show security command help
glab security --help
# Enable a scan profile on the current project
glab security config enable dependency_scanning
# Enable SAST on a specific project
glab security config enable sast -R gitlab-org/cli
# Check profile status
glab security config status dependency_scanning
# Disable a scan profile
glab security config disable dependency_scanning
# Disable dependency scanning auto-remediation
glab security config disable dependency_scanning_post_processing
Supported profile examples
Upstream help currently shows these profile names in examples:
dependency_scanningsastdependency_scanning_post_processingfor vulnerable dependency auto-remediation
GitLab may support additional profile names depending on instance version and project features. If a profile fails, use the error output and GitLab project security settings to confirm availability.
Operational guidance
- You must be a Maintainer or Owner of the target project.
- Use
-R/--repofor explicit targeting in agents and scripts; otherwiseglabresolves the project from the current git remote. - Treat
enableanddisableas project-configuration writes. Confirm the target project and requested profile before changing state. - Prefer
statusbefore and after a change so the user can see the current scan/profile state.
Safe workflow
PROFILE=sast
PROJECT=group/project
# 1. Inspect current state
glab security config status "$PROFILE" -R "$PROJECT"
# 2. Confirm requested change with the user, then apply
glab security config enable "$PROFILE" -R "$PROJECT"
# 3. Verify
glab security config status "$PROFILE" -R "$PROJECT"
Subcommands
See references/commands.md for the current captured --help output.