Skip to content
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

Draft for review: Security notes for Pipeline authors #4667

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

StackScribe
Copy link
Contributor

This is a draft to work on content. After #4612 is merged, this PR should be integrated into _chapter.yml appropriately and be mentioned in the index.doc and managing-security.adoc files.

@daniel-beck @Wadeck I made a rough start on the content and provided the relevant xrefs but I don't think that my prose is the best and there are probably other issues that should be included here.

@StackScribe StackScribe requested a review from a team as a code owner October 27, 2021 02:54
@probot-autolabeler probot-autolabeler bot added the documentation Jenkins documentation, including user and developer docs, solution pages, etc. label Oct 27, 2021
Copy link
Contributor

@Wadeck Wadeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the initiative!

content/doc/book/security/pipeline-authors.adoc Outdated Show resolved Hide resolved
content/doc/book/security/pipeline-authors.adoc Outdated Show resolved Hide resolved
@Wadeck Wadeck mentioned this pull request Nov 1, 2021
Meg McRoberts and others added 2 commits November 1, 2021 03:34
Co-authored-by: Wadeck Follonier <Wadeck@users.noreply.github.com>
Co-authored-by: Wadeck Follonier <Wadeck@users.noreply.github.com>
Copy link
Contributor

@kwhetstone kwhetstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

content/doc/book/security/pipeline-authors.adoc Outdated Show resolved Hide resolved

== Use Credentials to Access Resources

If your Pipeline needs to access external resources such as a database, artifact repository, or cloud, be sure to use credentials [add link] for authorization rather than hard coding the username/password, secret text, or other identifiers in your Pipeline.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this link in the main document so it can't be updated yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link added in 22eb380

and be very careful when passing sensitive data such as environment variables.
Never enclose sensitive environment variables in double quotes!
Data inside double quotes is subject to Groovy string interpolation, which means that Groovy evaluates the string and passes the actual value through where it may be visible as an argument to the `sh` or `bat` step or some other facility.
Data that is enclosed in single quotes is passed to the interpreter (`sh`, `bat`, `powershell`, or `pwsh` for evaluation and so is secure.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if you want to mention if that extends to the multi-line strings? ''' and """

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but could you give me a little more information? Maybe a code snippet as an example? I find one mention of multiline strings in "Storing Secrets" in /doc/developer but no discussion of them and I'm not familiar with them.

Meg McRoberts and others added 2 commits January 11, 2022 01:05
Co-authored-by: Kristin Whetstone <kwhetstone@cloudbees.com>
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Jenkins documentation, including user and developer docs, solution pages, etc. stalled Pull requests that are not progressing unresolved-merge-conflict There is a merge conflict with the target branch. work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants