diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/security_reports')
5 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue b/app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue index 3a4453bc7ae..e0669b3ed27 100644 --- a/app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue +++ b/app/assets/javascripts/vue_shared/security_reports/components/artifact_downloads/merge_request_artifact_download.vue @@ -26,6 +26,11 @@ export default { type: Number, required: true, }, + injectedArtifacts: { + type: Array, + required: false, + default: () => [], + }, }, data() { return { @@ -56,6 +61,9 @@ export default { isLoadingReportArtifacts() { return this.$apollo.queries.reportArtifacts.loading; }, + mergedReportArtifacts() { + return [...this.reportArtifacts, ...this.injectedArtifacts]; + }, }, methods: { showError(error) { @@ -77,7 +85,7 @@ export default { <template> <security-report-download-dropdown :title="s__('SecurityReports|Download results')" - :artifacts="reportArtifacts" + :artifacts="mergedReportArtifacts" :loading="isLoadingReportArtifacts" /> </template> diff --git a/app/assets/javascripts/vue_shared/security_reports/constants.js b/app/assets/javascripts/vue_shared/security_reports/constants.js index b024e92bd0e..fafbd02634f 100644 --- a/app/assets/javascripts/vue_shared/security_reports/constants.js +++ b/app/assets/javascripts/vue_shared/security_reports/constants.js @@ -17,6 +17,7 @@ export const REPORT_FILE_TYPES = { * Security scan report types, as provided by the backend. */ export const REPORT_TYPE_SAST = 'sast'; +export const REPORT_TYPE_SAST_IAC = 'sast_iac'; export const REPORT_TYPE_DAST = 'dast'; export const REPORT_TYPE_DAST_PROFILES = 'dast_profiles'; export const REPORT_TYPE_SECRET_DETECTION = 'secret_detection'; diff --git a/app/assets/javascripts/vue_shared/security_reports/graphql/queries/security_report_pipeline_download_paths.query.graphql b/app/assets/javascripts/vue_shared/security_reports/graphql/queries/security_report_pipeline_download_paths.query.graphql index b5858ab012b..e1f3c55a886 100644 --- a/app/assets/javascripts/vue_shared/security_reports/graphql/queries/security_report_pipeline_download_paths.query.graphql +++ b/app/assets/javascripts/vue_shared/security_reports/graphql/queries/security_report_pipeline_download_paths.query.graphql @@ -1,6 +1,6 @@ #import "../fragments/job_artifacts.fragment.graphql" -query getCorpuses($projectPath: ID!, $iid: ID, $reportTypes: [SecurityReportTypeEnum!]) { +query getPipelineCorpuses($projectPath: ID!, $iid: ID, $reportTypes: [SecurityReportTypeEnum!]) { project(fullPath: $projectPath) { pipeline(iid: $iid) { id diff --git a/app/assets/javascripts/vue_shared/security_reports/store/modules/sast/actions.js b/app/assets/javascripts/vue_shared/security_reports/store/modules/sast/actions.js index 62a51abe038..8aefc13a5fa 100644 --- a/app/assets/javascripts/vue_shared/security_reports/store/modules/sast/actions.js +++ b/app/assets/javascripts/vue_shared/security_reports/store/modules/sast/actions.js @@ -18,6 +18,7 @@ export const fetchDiff = ({ state, rootState, dispatch }) => { return fetchDiffData(rootState, state.paths.diffEndpoint, REPORT_TYPE_SAST) .then((data) => { dispatch('receiveDiffSuccess', data); + return data; }) .catch(() => { dispatch('receiveDiffError'); diff --git a/app/assets/javascripts/vue_shared/security_reports/store/modules/secret_detection/actions.js b/app/assets/javascripts/vue_shared/security_reports/store/modules/secret_detection/actions.js index 722dcce3075..13ca154bfa7 100644 --- a/app/assets/javascripts/vue_shared/security_reports/store/modules/secret_detection/actions.js +++ b/app/assets/javascripts/vue_shared/security_reports/store/modules/secret_detection/actions.js @@ -18,6 +18,7 @@ export const fetchDiff = ({ state, rootState, dispatch }) => { return fetchDiffData(rootState, state.paths.diffEndpoint, REPORT_TYPE_SECRET_DETECTION) .then((data) => { dispatch('receiveDiffSuccess', data); + return data; }) .catch(() => { dispatch('receiveDiffError'); |