Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f42befd1
Commit
f42befd1
authored
Sep 04, 2020
by
Zach Rice
Committed by
Douglas Barbosa Alexandre
Sep 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Secret-Detection template to use commits file
parent
957bd3bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
changelogs/unreleased/secret-detection-commits-file.yml
changelogs/unreleased/secret-detection-commits-file.yml
+5
-0
lib/gitlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
...tlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
+3
-2
No files found.
changelogs/unreleased/secret-detection-commits-file.yml
0 → 100644
View file @
f42befd1
---
title
:
Update Secret-Detection template to use commits file
merge_request
:
41364
author
:
type
:
changed
lib/gitlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
View file @
f42befd1
...
@@ -35,6 +35,7 @@ secret_detection:
...
@@ -35,6 +35,7 @@ secret_detection:
-
if
:
$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
script
:
script
:
-
git fetch origin $CI_DEFAULT_BRANCH $CI_BUILD_REF_NAME
-
git fetch origin $CI_DEFAULT_BRANCH $CI_BUILD_REF_NAME
-
export SECRET_DETECTION_COMMIT_TO=$(git log --left-right --cherry-pick --pretty=format:"%H" refs/remotes/origin/$CI_DEFAULT_BRANCH...refs/remotes/origin/$CI_BUILD_REF_NAME | tail -n 1)
-
git log --left-right --cherry-pick --pretty=format:"%H" refs/remotes/origin/$CI_DEFAULT_BRANCH...refs/remotes/origin/$CI_BUILD_REF_NAME > "$CI_COMMIT_SHA"_commit_list.txt
-
export SECRET_DETECTION_COMMIT
_FROM=$CI_COMMIT_SHA
-
export SECRET_DETECTION_COMMIT
S_FILE="$CI_COMMIT_SHA"_commit_list.txt
-
/analyzer run
-
/analyzer run
-
rm "$CI_COMMIT_SHA"_commit_list.txt
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment