Fix Security training URL cached by language cache key selection
What does this MR do and why?
While validating #362697 (closed) it was discovered that an error had been made in the introduction of language parameter filtering of security training URLs which only demonstrated while using GitLab's Reactive Caching mechanism. During local testing this was disabled, hiding the error.
This MR ensure that the appropriate details are passed to fetch the desired URLs from the reactive cache if a response has been cached.
Screenshots or screen recordings
How to set up and validate locally
- Configure local project.
- Navigate to
/-/security/configuration
on the respective project and enable the Kontra and SecureCodeWarrior training integrations for that project. - Navigate to your local GitLab
/-/graphql-explorer
- The following query will present a set of security training urls for your respective project
{
project(fullPath: "") {
securityTrainingUrls(identifierExternalIds: ["CWE-94", "91"]) {
name
url
status
identifier
}
}
}
- Applying the
filename
parameter with a recognised file extension will result in the appropriate language filtering. Unrecognised extensions are disregarded.
{
project(fullPath: "") {
securityTrainingUrls(identifierExternalIds: ["CWE-94", "91"], filename: "thing.rb") {
name
url
status
identifier
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #362697 (closed)
Edited by Gregory Havenga