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
991baaf2
Commit
991baaf2
authored
Dec 15, 2020
by
Saikat Sarkar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatic token revocation no longer restricted to gitlab.com
parent
b096d87c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
ee/app/workers/ee/build_finished_worker.rb
ee/app/workers/ee/build_finished_worker.rb
+1
-2
ee/changelogs/unreleased/avoid_instance_level_check.yml
ee/changelogs/unreleased/avoid_instance_level_check.yml
+5
-0
ee/spec/workers/build_finished_worker_spec.rb
ee/spec/workers/build_finished_worker_spec.rb
+5
-10
No files found.
ee/app/workers/ee/build_finished_worker.rb
View file @
991baaf2
...
...
@@ -17,7 +17,6 @@ module EE
private
def
revoke_secret_detection_token?
(
build
)
::
Gitlab
.
com?
&&
::
Gitlab
::
CurrentSettings
.
secret_detection_token_revocation_enabled?
&&
secret_detection_vulnerability_found?
(
build
)
end
...
...
ee/changelogs/unreleased/avoid_instance_level_check.yml
0 → 100644
View file @
991baaf2
---
title
:
Automatic token revocation no longer restricted to gitlab.com
merge_request
:
50087
author
:
type
:
changed
ee/spec/workers/build_finished_worker_spec.rb
View file @
991baaf2
...
...
@@ -23,20 +23,15 @@ RSpec.describe BuildFinishedWorker do
describe
'#revoke_secret_detection_token?'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:dot_com
,
:token_revocation_enabled
,
:secret_detection_vulnerability_found
,
:expected_result
)
do
true
|
true
|
true
|
true
true
|
true
|
false
|
false
true
|
false
|
true
|
false
true
|
false
|
false
|
false
false
|
true
|
true
|
false
false
|
true
|
false
|
false
false
|
false
|
true
|
false
false
|
false
|
false
|
false
where
(
:token_revocation_enabled
,
:secret_detection_vulnerability_found
,
:expected_result
)
do
true
|
true
|
true
true
|
false
|
false
false
|
true
|
false
false
|
false
|
false
end
with_them
do
before
do
allow
(
Gitlab
).
to
receive
(
:com?
)
{
dot_com
}
stub_application_setting
(
secret_detection_token_revocation_enabled:
token_revocation_enabled
)
allow_next_instance_of
(
described_class
)
do
|
build_finished_worker
|
...
...
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