Commit 2675857c authored by Markus Koller's avatar Markus Koller

Merge branch 'andysoiron/stip-markup-for-vulnerability-attachment-message' into 'master'

Sanitize link markup for vulnerability chat messages

See merge request gitlab-org/gitlab!78669
parents dde4fad2 60913a4b
......@@ -19,7 +19,7 @@ module Integrations
def attachments
[{
title: title,
title: strip_markup(title),
title_link: vulnerability_url,
color: attachment_color,
fields: attachment_fields
......
......@@ -31,6 +31,8 @@ RSpec.describe Integrations::ChatMessage::VulnerabilityMessage do
}
end
it_behaves_like Integrations::ChatMessage
describe '#message' do
it 'returns the correct message' do
expect(subject.message).to eq("Vulnerability detected in [Foobar Project](https://git.example.com/random/foobar)")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment