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
288e444b
Commit
288e444b
authored
Jun 14, 2021
by
Mikołaj Wawrzyniak
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-zeitwerk-api' into 'master'
Rename Api to API See merge request gitlab-org/gitlab!63817
parents
1d4458a4
098a5166
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
19 additions
and
19 deletions
+19
-19
doc/development/appsec/index.md
doc/development/appsec/index.md
+1
-1
ee/app/graphql/ee/types/mutation_type.rb
ee/app/graphql/ee/types/mutation_type.rb
+1
-1
ee/app/graphql/ee/types/project_type.rb
ee/app/graphql/ee/types/project_type.rb
+3
-3
ee/app/graphql/mutations/app_sec/fuzzing/api/ci_configuration/create.rb
.../mutations/app_sec/fuzzing/api/ci_configuration/create.rb
+3
-3
ee/app/graphql/types/app_sec/fuzzing/api/ci_configuration_type.rb
...raphql/types/app_sec/fuzzing/api/ci_configuration_type.rb
+1
-1
ee/app/graphql/types/app_sec/fuzzing/api/scan_mode_enum.rb
ee/app/graphql/types/app_sec/fuzzing/api/scan_mode_enum.rb
+2
-2
ee/app/graphql/types/app_sec/fuzzing/api/scan_profile_type.rb
...pp/graphql/types/app_sec/fuzzing/api/scan_profile_type.rb
+1
-1
ee/app/models/app_sec/fuzzing/api/ci_configuration.rb
ee/app/models/app_sec/fuzzing/api/ci_configuration.rb
+1
-1
ee/app/models/app_sec/fuzzing/api/scan_profile.rb
ee/app/models/app_sec/fuzzing/api/scan_profile.rb
+1
-1
ee/app/services/app_sec/fuzzing/api/ci_configuration_create_service.rb
...es/app_sec/fuzzing/api/ci_configuration_create_service.rb
+1
-1
ee/spec/graphql/mutations/app_sec/fuzzing/api/ci_configuration/create_spec.rb
...tions/app_sec/fuzzing/api/ci_configuration/create_spec.rb
+1
-1
ee/spec/models/app_sec/fuzzing/api/ci_configuration_spec.rb
ee/spec/models/app_sec/fuzzing/api/ci_configuration_spec.rb
+1
-1
ee/spec/requests/api/graphql/app_sec/fuzzing/api/ci_configuration_type_spec.rb
...graphql/app_sec/fuzzing/api/ci_configuration_type_spec.rb
+1
-1
ee/spec/services/app_sec/fuzzing/api/ci_configuration_create_service_spec.rb
...p_sec/fuzzing/api/ci_configuration_create_service_spec.rb
+1
-1
No files found.
doc/development/appsec/index.md
View file @
288e444b
...
@@ -20,7 +20,7 @@ the feature categories in the [Secure](https://about.gitlab.com/stages-devops-li
...
@@ -20,7 +20,7 @@ the feature categories in the [Secure](https://about.gitlab.com/stages-devops-li
-
`AppSec::ContainerScanning`
: Container Scanning code.
-
`AppSec::ContainerScanning`
: Container Scanning code.
-
`AppSec::Dast`
: DAST code.
-
`AppSec::Dast`
: DAST code.
-
`AppSec::DependencyScanning`
: Dependency Scanning code.
-
`AppSec::DependencyScanning`
: Dependency Scanning code.
-
`AppSec::Fuzzing::A
pi
`
: API Fuzzing code.
-
`AppSec::Fuzzing::A
PI
`
: API Fuzzing code.
-
`AppSec::Fuzzing::Coverage`
: Coverage Fuzzing code.
-
`AppSec::Fuzzing::Coverage`
: Coverage Fuzzing code.
-
`AppSec::Fuzzing`
: Shared fuzzing code.
-
`AppSec::Fuzzing`
: Shared fuzzing code.
-
`AppSec::LicenseCompliance`
: License Compliance code.
-
`AppSec::LicenseCompliance`
: License Compliance code.
...
...
ee/app/graphql/ee/types/mutation_type.rb
View file @
288e444b
...
@@ -78,7 +78,7 @@ module EE
...
@@ -78,7 +78,7 @@ module EE
mount_mutation
::
Mutations
::
IncidentManagement
::
OncallRotation
::
Destroy
mount_mutation
::
Mutations
::
IncidentManagement
::
OncallRotation
::
Destroy
mount_mutation
::
Mutations
::
IncidentManagement
::
EscalationPolicy
::
Create
mount_mutation
::
Mutations
::
IncidentManagement
::
EscalationPolicy
::
Create
mount_mutation
::
Mutations
::
IncidentManagement
::
EscalationPolicy
::
Destroy
mount_mutation
::
Mutations
::
IncidentManagement
::
EscalationPolicy
::
Destroy
mount_mutation
::
Mutations
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfiguration
::
Create
mount_mutation
::
Mutations
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfiguration
::
Create
prepend
(
Types
::
DeprecatedMutations
)
prepend
(
Types
::
DeprecatedMutations
)
end
end
...
...
ee/app/graphql/ee/types/project_type.rb
View file @
288e444b
...
@@ -146,7 +146,7 @@ module EE
...
@@ -146,7 +146,7 @@ module EE
resolver:
::
Resolvers
::
IncidentManagement
::
EscalationPoliciesResolver
.
single
resolver:
::
Resolvers
::
IncidentManagement
::
EscalationPoliciesResolver
.
single
field
:api_fuzzing_ci_configuration
,
field
:api_fuzzing_ci_configuration
,
::
Types
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfigurationType
,
::
Types
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfigurationType
,
null:
true
,
null:
true
,
description:
'API fuzzing configuration for the project. '
description:
'API fuzzing configuration for the project. '
...
@@ -174,10 +174,10 @@ module EE
...
@@ -174,10 +174,10 @@ module EE
def
api_fuzzing_ci_configuration
def
api_fuzzing_ci_configuration
return
unless
Ability
.
allowed?
(
current_user
,
:read_security_resource
,
object
)
return
unless
Ability
.
allowed?
(
current_user
,
:read_security_resource
,
object
)
configuration
=
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfiguration
.
new
(
project:
object
)
configuration
=
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfiguration
.
new
(
project:
object
)
{
{
scan_modes:
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfiguration
::
SCAN_MODES
,
scan_modes:
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfiguration
::
SCAN_MODES
,
scan_profiles:
configuration
.
scan_profiles
scan_profiles:
configuration
.
scan_profiles
}
}
end
end
...
...
ee/app/graphql/mutations/app_sec/fuzzing/api/ci_configuration/create.rb
View file @
288e444b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
Mutations
module
Mutations
module
AppSec
module
AppSec
module
Fuzzing
module
Fuzzing
module
A
pi
module
A
PI
module
CiConfiguration
module
CiConfiguration
class
Create
<
BaseMutation
class
Create
<
BaseMutation
include
FindsProject
include
FindsProject
...
@@ -27,7 +27,7 @@ module Mutations
...
@@ -27,7 +27,7 @@ module Mutations
required:
false
,
required:
false
,
description:
'CI variable containing the username for authenticating with the target API.'
description:
'CI variable containing the username for authenticating with the target API.'
argument
:scan_mode
,
::
Types
::
AppSec
::
Fuzzing
::
A
pi
::
ScanModeEnum
,
argument
:scan_mode
,
::
Types
::
AppSec
::
Fuzzing
::
A
PI
::
ScanModeEnum
,
required:
true
,
required:
true
,
description:
'The mode for API fuzzing scans.'
description:
'The mode for API fuzzing scans.'
...
@@ -53,7 +53,7 @@ module Mutations
...
@@ -53,7 +53,7 @@ module Mutations
def
resolve
(
args
)
def
resolve
(
args
)
project
=
authorized_find!
(
args
[
:project_path
])
project
=
authorized_find!
(
args
[
:project_path
])
create_service
=
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfigurationCreateService
.
new
(
create_service
=
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfigurationCreateService
.
new
(
container:
project
,
current_user:
current_user
,
params:
args
container:
project
,
current_user:
current_user
,
params:
args
)
)
...
...
ee/app/graphql/types/app_sec/fuzzing/api/ci_configuration_type.rb
View file @
288e444b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
Types
module
Types
module
AppSec
module
AppSec
module
Fuzzing
module
Fuzzing
module
A
pi
module
A
PI
# rubocop: disable Graphql/AuthorizeTypes
# rubocop: disable Graphql/AuthorizeTypes
class
CiConfigurationType
<
BaseObject
class
CiConfigurationType
<
BaseObject
graphql_name
'ApiFuzzingCiConfiguration'
graphql_name
'ApiFuzzingCiConfiguration'
...
...
ee/app/graphql/types/app_sec/fuzzing/api/scan_mode_enum.rb
View file @
288e444b
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
module
Types
module
Types
module
AppSec
module
AppSec
module
Fuzzing
module
Fuzzing
module
A
pi
module
A
PI
class
ScanModeEnum
<
BaseEnum
class
ScanModeEnum
<
BaseEnum
graphql_name
'ApiFuzzingScanMode'
graphql_name
'ApiFuzzingScanMode'
description
'All possible ways to specify the API surface for an API fuzzing scan.'
description
'All possible ways to specify the API surface for an API fuzzing scan.'
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfiguration
::
SCAN_MODES
.
each
do
|
mode
|
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfiguration
::
SCAN_MODES
.
each
do
|
mode
|
value
mode
.
upcase
,
value:
mode
,
description:
"The API surface is specified by a
#{
mode
.
upcase
}
file."
value
mode
.
upcase
,
value:
mode
,
description:
"The API surface is specified by a
#{
mode
.
upcase
}
file."
end
end
end
end
...
...
ee/app/graphql/types/app_sec/fuzzing/api/scan_profile_type.rb
View file @
288e444b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
Types
module
Types
module
AppSec
module
AppSec
module
Fuzzing
module
Fuzzing
module
A
pi
module
A
PI
# rubocop: disable Graphql/AuthorizeTypes
# rubocop: disable Graphql/AuthorizeTypes
class
ScanProfileType
<
BaseObject
class
ScanProfileType
<
BaseObject
graphql_name
'ApiFuzzingScanProfile'
graphql_name
'ApiFuzzingScanProfile'
...
...
ee/app/models/app_sec/fuzzing/api/ci_configuration.rb
View file @
288e444b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
module
AppSec
module
AppSec
module
Fuzzing
module
Fuzzing
module
A
pi
module
A
PI
class
CiConfiguration
class
CiConfiguration
PROFILES_DEFINITION_FILE
=
'https://gitlab.com/gitlab-org/security-products/analyzers'
\
PROFILES_DEFINITION_FILE
=
'https://gitlab.com/gitlab-org/security-products/analyzers'
\
'/api-fuzzing/-/raw/master/gitlab-api-fuzzing-config.yml'
'/api-fuzzing/-/raw/master/gitlab-api-fuzzing-config.yml'
...
...
ee/app/models/app_sec/fuzzing/api/scan_profile.rb
View file @
288e444b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
module
AppSec
module
AppSec
module
Fuzzing
module
Fuzzing
module
A
pi
module
A
PI
class
ScanProfile
class
ScanProfile
NAMES
=
%w(Quick-10 Medium-20 Medium-50 Long-100)
.
freeze
NAMES
=
%w(Quick-10 Medium-20 Medium-50 Long-100)
.
freeze
...
...
ee/app/services/app_sec/fuzzing/api/ci_configuration_create_service.rb
View file @
288e444b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
module
AppSec
module
AppSec
module
Fuzzing
module
Fuzzing
module
A
pi
module
A
PI
class
CiConfigurationCreateService
<
::
BaseContainerService
class
CiConfigurationCreateService
<
::
BaseContainerService
API_SPECIFICATION_CI_VARIABLES
=
{
API_SPECIFICATION_CI_VARIABLES
=
{
har:
'FUZZAPI_HAR'
,
har:
'FUZZAPI_HAR'
,
...
...
ee/spec/graphql/mutations/app_sec/fuzzing/api/ci_configuration/create_spec.rb
View file @
288e444b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Mutations
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfiguration
::
Create
do
RSpec
.
describe
Mutations
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfiguration
::
Create
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
...
...
ee/spec/models/app_sec/fuzzing/api/ci_configuration_spec.rb
View file @
288e444b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
AppSec
::
Fuzzing
::
A
pi
::
CiConfiguration
do
RSpec
.
describe
AppSec
::
Fuzzing
::
A
PI
::
CiConfiguration
do
include
StubRequests
include
StubRequests
describe
'#scan_profiles'
do
describe
'#scan_profiles'
do
...
...
ee/spec/requests/api/graphql/app_sec/fuzzing/api/ci_configuration_type_spec.rb
View file @
288e444b
...
@@ -38,7 +38,7 @@ RSpec.describe 'Query.project(fullPath).apiFuzzingCiConfiguration' do
...
@@ -38,7 +38,7 @@ RSpec.describe 'Query.project(fullPath).apiFuzzingCiConfiguration' do
project
.
add_developer
(
user
)
project
.
add_developer
(
user
)
stub_full_request
(
stub_full_request
(
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfiguration
::
PROFILES_DEFINITION_FILE
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfiguration
::
PROFILES_DEFINITION_FILE
).
to_return
(
body:
profiles_yaml
)
).
to_return
(
body:
profiles_yaml
)
end
end
...
...
ee/spec/services/app_sec/fuzzing/api/ci_configuration_create_service_spec.rb
View file @
288e444b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
::
AppSec
::
Fuzzing
::
A
pi
::
CiConfigurationCreateService
do
RSpec
.
describe
::
AppSec
::
Fuzzing
::
A
PI
::
CiConfigurationCreateService
do
let
(
:service
)
{
described_class
.
new
(
container:
double
(
Project
),
current_user:
double
(
User
),
params:
params
)
}
let
(
:service
)
{
described_class
.
new
(
container:
double
(
Project
),
current_user:
double
(
User
),
params:
params
)
}
describe
'#create'
do
describe
'#create'
do
...
...
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