-
Notifications
You must be signed in to change notification settings - Fork 419
Use GroovySourceFileAllowlist to adapt to SECURITY-359 changes #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5d68fc4
8ca0bc8
e5fcd97
b0a7634
52add09
089a373
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,9 +54,11 @@ public class FromFingerprintStepTest { | |
| String script = "node {\n" + | ||
| " sh 'mkdir buildWithFROMArgs'\n" + | ||
| " writeFile file: 'Dockerfile', text: '" + dockerFile + "'\n" + | ||
| " withEnv(['DOCKER_BUILDKIT=0']) {\n" + | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When using BuildKit (which IIUC is currently the default), the built image does not list the FROM image as its parent in |
||
| " def built = docker.build('my-tag') \n" + | ||
| " dockerFingerprintFrom dockerfile: 'Dockerfile', image: 'my-tag' \n" + | ||
| " echo \"built ${built.id}\"\n" + | ||
| " }\n" + | ||
| "}"; | ||
|
|
||
| assertBuild("build", script, BUSYBOX_IMAGE); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,13 +27,13 @@ pipeline { | |
| stages { | ||
| stage("build image") { | ||
| steps { | ||
| sh 'docker build -t maven:3-alpine .' | ||
| sh 'docker build -t maven:3-jdk-8-slim .' | ||
| } | ||
| } | ||
| stage("in built image") { | ||
| agent { | ||
| docker { | ||
| image "maven:3-alpine" | ||
| image "maven:3-jdk-8-slim" | ||
| args "-v /tmp:/tmp" | ||
| reuseNode true | ||
| } | ||
|
|
@@ -46,7 +46,7 @@ pipeline { | |
| stage("in pulled image") { | ||
| agent { | ||
| docker { | ||
| image "maven:3-alpine" | ||
| image "maven:3-jdk-8-slim" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| alwaysPull true | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I get it right, that if
AbstractDockerPipelineScriptis allowed, then all classes that extend it are also allowed?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they have to be allowed individually. However, the concrete classes are all used by subclasses of
WithScriptDescribable, which are handled automatically by jenkinsci/pipeline-model-definition-plugin#529. See specificallyWithScriptAllowlist: jenkinsci/pipeline-model-definition-plugin#529 (comment).The reason we need this entry is that without it, the concrete classes are allowed by
WithScriptAllowist, but they cannot be instantiated because their superclassAbstractDockerPipelineScriptcannot be found.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see it now, thanks.