-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for exposed GitLab CI configuration file
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
metadata: | ||
language: v2-beta | ||
name: "GitLab CI Exposure" | ||
description: "Tests for exposed GitLab CI files" | ||
author: "Patrick Harrison" | ||
tags: "exposure", "gitlab", "config", "file" | ||
|
||
run for each: | ||
potential_path = "/.gitlab-ci.yml" | ||
|
||
given host then | ||
send request called check: | ||
method: "GET" | ||
path: {potential_path} | ||
|
||
if "stage" in {check.response.body} then | ||
report issue: | ||
severity: low | ||
confidence: firm | ||
detail: `GitLab CI file found at {check.request.url}` | ||
remediation: "Ensure your configuration files are not exposed." | ||
end if |