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
85ad6897
Commit
85ad6897
authored
Oct 29, 2020
by
Michael Eddington
Committed by
Ash McKenzie
Oct 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show error when API Fuzzing feature not available
parent
24490f47
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
changelogs/unreleased/270412-license-error-in-template.yml
changelogs/unreleased/270412-license-error-in-template.yml
+5
-0
ee/spec/lib/gitlab/ci/templates/api_fuzzing_gitlab_ci_yaml_spec.rb
...ib/gitlab/ci/templates/api_fuzzing_gitlab_ci_yaml_spec.rb
+2
-2
lib/gitlab/ci/templates/Security/API-Fuzzing.gitlab-ci.yml
lib/gitlab/ci/templates/Security/API-Fuzzing.gitlab-ci.yml
+11
-0
No files found.
changelogs/unreleased/270412-license-error-in-template.yml
0 → 100644
View file @
85ad6897
---
title
:
Show error in pipeline when API Fuzzing not licensed
merge_request
:
46064
author
:
type
:
changed
ee/spec/lib/gitlab/ci/templates/api_fuzzing_gitlab_ci_yaml_spec.rb
View file @
85ad6897
...
@@ -47,8 +47,8 @@ RSpec.describe 'API-Fuzzing.gitlab-ci.yml' do
...
@@ -47,8 +47,8 @@ RSpec.describe 'API-Fuzzing.gitlab-ci.yml' do
create
(
:ci_variable
,
project:
project
,
key:
'FUZZAPI_TARGET_URL'
,
value:
'http://example.com'
)
create
(
:ci_variable
,
project:
project
,
key:
'FUZZAPI_TARGET_URL'
,
value:
'http://example.com'
)
end
end
it
'includes
no jobs
'
do
it
'includes
job to display error
'
do
expect
{
pipeline
}.
to
raise_error
(
Ci
::
CreatePipelineService
::
CreateError
)
expect
(
build_names
).
to
match_array
(
%w[apifuzzer_fuzz_unlicensed]
)
end
end
end
end
...
...
lib/gitlab/ci/templates/Security/API-Fuzzing.gitlab-ci.yml
View file @
85ad6897
...
@@ -26,6 +26,17 @@ variables:
...
@@ -26,6 +26,17 @@ variables:
FUZZAPI_IMAGE
:
registry.gitlab.com/gitlab-org/security-products/analyzers/api-fuzzing:${FUZZAPI_VERSION}-engine
FUZZAPI_IMAGE
:
registry.gitlab.com/gitlab-org/security-products/analyzers/api-fuzzing:${FUZZAPI_VERSION}-engine
#
#
apifuzzer_fuzz_unlicensed
:
stage
:
fuzz
allow_failure
:
true
rules
:
-
if
:
'
$GITLAB_FEATURES
!~
/\bapi_fuzzing\b/
&&
$API_FUZZING_DISABLED
==
null'
-
when
:
never
script
:
-
|
echo "Error: Your GitLab project is not licensed for API Fuzzing."
-
exit
1
apifuzzer_fuzz
:
apifuzzer_fuzz
:
stage
:
fuzz
stage
:
fuzz
image
:
image
:
...
...
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