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
cc9fb8b0
Commit
cc9fb8b0
authored
Nov 23, 2020
by
Michael Eddington
Committed by
Jan Provaznik
Nov 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API Fuzzing usage data
parent
bb9d8871
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
ee/changelogs/unreleased/210345-api-fuzz-telemetry-by-faults.yml
...gelogs/unreleased/210345-api-fuzz-telemetry-by-faults.yml
+5
-0
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+6
-0
ee/spec/lib/ee/gitlab/usage_data_spec.rb
ee/spec/lib/ee/gitlab/usage_data_spec.rb
+17
-0
No files found.
ee/changelogs/unreleased/210345-api-fuzz-telemetry-by-faults.yml
0 → 100644
View file @
cc9fb8b0
---
title
:
Add API Fuzzing job counts to telemetry pings
merge_request
:
47451
author
:
type
:
changed
ee/lib/ee/gitlab/usage_data.rb
View file @
cc9fb8b0
...
@@ -36,6 +36,12 @@ module EE
...
@@ -36,6 +36,12 @@ module EE
},
},
coverage_fuzzing:
{
coverage_fuzzing:
{
name: :coverage_fuzzing_jobs
name: :coverage_fuzzing_jobs
},
apifuzzer_fuzz:
{
name: :api_fuzzing_jobs
},
apifuzzer_fuzz_dnd:
{
name: :api_fuzzing_dnd_jobs
}
}
}.
freeze
}.
freeze
...
...
ee/spec/lib/ee/gitlab/usage_data_spec.rb
View file @
cc9fb8b0
...
@@ -29,6 +29,8 @@ RSpec.describe Gitlab::UsageData do
...
@@ -29,6 +29,8 @@ RSpec.describe Gitlab::UsageData do
create
(
:ci_build
,
name:
'sast'
,
pipeline:
pipeline
)
create
(
:ci_build
,
name:
'sast'
,
pipeline:
pipeline
)
create
(
:ci_build
,
name:
'secret_detection'
,
pipeline:
pipeline
)
create
(
:ci_build
,
name:
'secret_detection'
,
pipeline:
pipeline
)
create
(
:ci_build
,
name:
'coverage_fuzzing'
,
pipeline:
pipeline
)
create
(
:ci_build
,
name:
'coverage_fuzzing'
,
pipeline:
pipeline
)
create
(
:ci_build
,
name:
'apifuzzer_fuzz'
,
pipeline:
pipeline
)
create
(
:ci_build
,
name:
'apifuzzer_fuzz_dnd'
,
pipeline:
pipeline
)
create
(
:ci_pipeline
,
source: :ondemand_dast_scan
,
project:
projects
[
0
])
create
(
:ci_pipeline
,
source: :ondemand_dast_scan
,
project:
projects
[
0
])
create
(
:prometheus_alert
,
project:
projects
[
0
])
create
(
:prometheus_alert
,
project:
projects
[
0
])
...
@@ -145,6 +147,8 @@ RSpec.describe Gitlab::UsageData do
...
@@ -145,6 +147,8 @@ RSpec.describe Gitlab::UsageData do
expect
(
count_data
[
:sast_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:sast_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:secret_detection_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:secret_detection_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:coverage_fuzzing_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:coverage_fuzzing_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:api_fuzzing_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:api_fuzzing_dnd_jobs
]).
to
eq
(
1
)
expect
(
count_data
[
:dast_on_demand_pipelines
]).
to
eq
(
1
)
expect
(
count_data
[
:dast_on_demand_pipelines
]).
to
eq
(
1
)
end
end
...
@@ -528,6 +532,8 @@ RSpec.describe Gitlab::UsageData do
...
@@ -528,6 +532,8 @@ RSpec.describe Gitlab::UsageData do
before
do
before
do
for_defined_days_back
do
for_defined_days_back
do
create
(
:ci_build
,
name:
'apifuzzer_fuzz'
,
user:
user
)
create
(
:ci_build
,
name:
'apifuzzer_fuzz_dnd'
,
user:
user
)
create
(
:ci_build
,
name:
'container_scanning'
,
user:
user
)
create
(
:ci_build
,
name:
'container_scanning'
,
user:
user
)
create
(
:ci_build
,
name:
'coverage_fuzzing'
,
user:
user
)
create
(
:ci_build
,
name:
'coverage_fuzzing'
,
user:
user
)
create
(
:ci_build
,
name:
'dast'
,
user:
user
)
create
(
:ci_build
,
name:
'dast'
,
user:
user
)
...
@@ -542,6 +548,8 @@ RSpec.describe Gitlab::UsageData do
...
@@ -542,6 +548,8 @@ RSpec.describe Gitlab::UsageData do
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
user_preferences_group_overview_security_dashboard:
3
,
user_preferences_group_overview_security_dashboard:
3
,
user_container_scanning_jobs:
1
,
user_container_scanning_jobs:
1
,
user_api_fuzzing_jobs:
1
,
user_api_fuzzing_dnd_jobs:
1
,
user_coverage_fuzzing_jobs:
1
,
user_coverage_fuzzing_jobs:
1
,
user_dast_jobs:
1
,
user_dast_jobs:
1
,
user_dependency_scanning_jobs:
1
,
user_dependency_scanning_jobs:
1
,
...
@@ -601,7 +609,10 @@ RSpec.describe Gitlab::UsageData do
...
@@ -601,7 +609,10 @@ RSpec.describe Gitlab::UsageData do
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
include
(
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
include
(
user_preferences_group_overview_security_dashboard:
3
,
user_preferences_group_overview_security_dashboard:
3
,
user_api_fuzzing_jobs:
1
,
user_api_fuzzing_dnd_jobs:
1
,
user_container_scanning_jobs:
1
,
user_container_scanning_jobs:
1
,
user_coverage_fuzzing_jobs:
1
,
user_dast_jobs:
1
,
user_dast_jobs:
1
,
user_dependency_scanning_jobs:
1
,
user_dependency_scanning_jobs:
1
,
user_license_management_jobs:
1
,
user_license_management_jobs:
1
,
...
@@ -634,6 +645,8 @@ RSpec.describe Gitlab::UsageData do
...
@@ -634,6 +645,8 @@ RSpec.describe Gitlab::UsageData do
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
user_preferences_group_overview_security_dashboard:
3
,
user_preferences_group_overview_security_dashboard:
3
,
user_api_fuzzing_jobs:
1
,
user_api_fuzzing_dnd_jobs:
1
,
user_container_scanning_jobs:
1
,
user_container_scanning_jobs:
1
,
user_coverage_fuzzing_jobs:
1
,
user_coverage_fuzzing_jobs:
1
,
user_dast_jobs:
3
,
user_dast_jobs:
3
,
...
@@ -666,6 +679,8 @@ RSpec.describe Gitlab::UsageData do
...
@@ -666,6 +679,8 @@ RSpec.describe Gitlab::UsageData do
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
user_preferences_group_overview_security_dashboard:
3
,
user_preferences_group_overview_security_dashboard:
3
,
user_api_fuzzing_jobs:
1
,
user_api_fuzzing_dnd_jobs:
1
,
user_container_scanning_jobs:
1
,
user_container_scanning_jobs:
1
,
user_coverage_fuzzing_jobs:
1
,
user_coverage_fuzzing_jobs:
1
,
user_dast_jobs:
1
,
user_dast_jobs:
1
,
...
@@ -698,6 +713,8 @@ RSpec.describe Gitlab::UsageData do
...
@@ -698,6 +713,8 @@ RSpec.describe Gitlab::UsageData do
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
expect
(
described_class
.
usage_activity_by_stage_secure
(
described_class
.
last_28_days_time_period
)).
to
eq
(
user_preferences_group_overview_security_dashboard:
-
1
,
user_preferences_group_overview_security_dashboard:
-
1
,
user_api_fuzzing_jobs:
-
1
,
user_api_fuzzing_dnd_jobs:
-
1
,
user_container_scanning_jobs:
-
1
,
user_container_scanning_jobs:
-
1
,
user_coverage_fuzzing_jobs:
-
1
,
user_coverage_fuzzing_jobs:
-
1
,
user_dast_jobs:
-
1
,
user_dast_jobs:
-
1
,
...
...
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