Skip to content
Snippets Groups Projects

Adherence check - Static Application Security Testing (SAST)

Merged Hitesh Raghuvanshi requested to merge 440722-sast-adherence into master
All threads resolved!
2 files
+ 3
22
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -11,13 +11,12 @@ module CreateService
override :track_artifact_uploader
def track_artifact_uploader(artifact)
super
return unless artifact.file_type == 'metrics' || artifact.file_type == 'sast'
if artifact.file_type == 'sast' && artifact.job.pipeline.ref == artifact.project.default_branch
if artifact.file_type == 'metrics'
track_usage_event(METRICS_REPORT_UPLOAD_EVENT_NAME, job.user_id)
elsif artifact.file_type == 'sast' && artifact.job.pipeline.ref == artifact.project.default_branch
::ComplianceManagement::Standards::Gitlab::SastWorker
.perform_async({ 'project_id' => project.id, 'user_id' => job.user_id })
else
track_usage_event(METRICS_REPORT_UPLOAD_EVENT_NAME, job.user_id)
end
end
end
Loading