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

[StepSecurity] Apply security best practices #2011

Conversation

step-security-bot
Copy link
Contributor

@step-security-bot step-security-bot commented Apr 25, 2024

With this PR our OSS scorecard jumps from 6.3 to 10

Summary

This pull request is created by StepSecurity at the request of @edcdavid. Please merge the Pull Request to incorporate the requested changes. Please tag @edcdavid on your message if you have any questions related to the PR.

Security Fixes

Least Privileged GitHub Actions Token Permissions

The GITHUB_TOKEN is an automatically generated secret to make authenticated calls to the GitHub API. GitHub recommends setting minimum token permissions for the GITHUB_TOKEN.

Pinned Dependencies

GitHub Action tags and Docker tags are mutable. This poses a security risk. GitHub's Security Hardening guide recommends pinning actions to full length commit.

Keeping your actions up to date with Dependabot

With Dependabot version updates, when Dependabot identifies an outdated dependency, it raises a pull request to update the manifest to the latest version of the dependency. This is recommended by GitHub as well as The Open Source Security Foundation (OpenSSF).

Secure Dockerfiles

Pin image tags to digests in Dockerfiles. With the Docker v2 API release, it became possible to use digests in place of tags when pulling images or to use them in FROM lines in Dockerfiles.

Feedback

For bug reports, feature requests, and general feedback; please email [email protected]. To create such PRs, please visit https://app.stepsecurity.io/securerepo.

Signed-off-by: StepSecurity Bot [email protected]

jobs:
update-certification:
permissions:
contents: write # for peter-evans/create-pull-request to create branch

Check failure

Code scanning / Scorecard

Token-Permissions

score is 0: jobLevel 'contents' permission set to 'write' Remediation tip: Verify which permissions are needed and consider whether you can reduce them. Click Remediation section below for further remediation help

Choose a reason for hiding this comment

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

    • - @

@dcibot
Copy link
Collaborator

dcibot commented Apr 25, 2024

@edcdavid edcdavid force-pushed the stepsecurity_remediation_1714077827 branch from d3fb5c0 to 8e1fbf9 Compare April 25, 2024 21:23
@sebrandon1
Copy link
Member

Interesting, does this work well with dependabot?

@dcibot
Copy link
Collaborator

dcibot commented Apr 26, 2024

@edcdavid
Copy link
Member

Interesting, does this work well with dependabot?

Do you mean to lock it in with the SHA? If yes, I am not sure. We would probably need to let in run for real for some time

@dcibot
Copy link
Collaborator

dcibot commented Apr 26, 2024

@dcibot
Copy link
Collaborator

dcibot commented Apr 26, 2024

@edcdavid edcdavid force-pushed the stepsecurity_remediation_1714077827 branch from b921df4 to 40adf47 Compare April 26, 2024 03:45
@dcibot
Copy link
Collaborator

dcibot commented Apr 26, 2024

@edcdavid edcdavid force-pushed the stepsecurity_remediation_1714077827 branch from 66ba312 to b5d0357 Compare April 26, 2024 15:13
@edcdavid edcdavid requested a review from sebrandon1 April 26, 2024 15:24
@dcibot
Copy link
Collaborator

dcibot commented Apr 26, 2024

@edcdavid edcdavid merged commit 180eb0e into redhat-best-practices-for-k8s:main Apr 26, 2024
20 checks passed
@dcibot
Copy link
Collaborator

dcibot commented Apr 26, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants