[misc] RequestParser: restrict imageName to an allow list and add tests

This commit is contained in:
Jakob Ackermann
2020-06-26 12:29:49 +01:00
parent c30e6a9d4f
commit 5ed09d1a98
5 changed files with 124 additions and 1 deletions

View File

@@ -73,6 +73,16 @@ if (process.env.ALLOWED_COMPILE_GROUPS) {
process.exit(1)
}
}
if (process.env.ALLOWED_IMAGE_NAMES_FLAT) {
try {
module.exports.allowedImageNamesFlat = process.env.ALLOWED_IMAGE_NAMES_FLAT.split(
' '
)
} catch (error) {
console.error(error, 'could not apply allowed image names setting')
process.exit(1)
}
}
if (process.env.DOCKER_RUNNER) {
let seccompProfilePath