Skip to content
代码片段 群组 项目
未验证 提交 9936f057 编辑于 作者: Fabio Pitino's avatar Fabio Pitino 提交者: GitLab
浏览文件

Merge branch '437098-compliance-on-demand-dast' into 'master'

Ignore compliance CI config when source is on-demand DAST scan

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144307



Merged-by: default avatarFabio Pitino <fpitino@gitlab.com>
Approved-by: default avatarRadamanthus Batnag <rbatnag@gitlab.com>
Approved-by: default avatarFabio Pitino <fpitino@gitlab.com>
Reviewed-by: default avatarRadamanthus Batnag <rbatnag@gitlab.com>
Co-authored-by: default avatarRadamanthus Batnag <rbatnag@gitlab.com>
Co-authored-by: default avatarArpit Gogia <12347103-arpitgogia@users.noreply.gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -9,7 +9,8 @@ def content
next unless available?
next unless pipeline_configuration_full_path.present?
next if pipeline_source_bridge && pipeline_source == :parent_pipeline
next if pipeline_source == :security_orchestration_policy
next if [:security_orchestration_policy, :ondemand_dast_scan].include?(pipeline_source)
path_file, path_project = pipeline_configuration_full_path.split('@', 2)
YAML.dump('include' => [{ 'project' => path_project, 'file' => path_file }])
......
......@@ -79,6 +79,23 @@
it_behaves_like 'does not include compliance pipeline configuration content'
end
end
context 'when the source is on-demand dast scan' do
let(:source) { :ondemand_dast_scan }
let(:content) { "---\ninclude:\n- template: DAST-On-Demand-Scan.gitlab-ci.yml\n" }
let(:content_result) do
<<~CICONFIG
---
include:
- template: DAST-On-Demand-Scan.gitlab-ci.yml
CICONFIG
end
it 'does not include compliance pipeline configuration' do
expect(config.source).to eq(:parameter_source)
expect(config.content).to eq(content_result)
end
end
end
context 'when compliance pipeline configuration is not defined' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册