Skip to content

feat: add control OSPS-BR-07 for secrets management - #373

Merged
funnelfiasco merged 4 commits into
ossf:mainfrom
trumant:issues/352
Sep 15, 2025
Merged

funnelfiasco merged 4 commits into
ossf:mainfrom
trumant:issues/352

Conversation

@trumant

@trumant trumant commented Aug 13, 2025 •

Copy link
Copy Markdown
Contributor

This change adds a new control to the Build & Release control family that focuses on secure handling and storage of project secrets.

This change closes #352

@trumant
trumant marked this pull request as ready for review August 14, 2025 12:49
Comment thread baseline/OSPS-QA.yaml Outdated
guideline-mappings:
- reference-id: BPB
identifiers:
- S-B-5 # TODO: is this the right numbering for https://www.bestpractices.dev/en/criteria#0.no_leaked_credentials

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, we have an outstanding action item to go back through all of the BPB identifiers to make them match the origin ID instead of the custom format

Comment thread baseline/OSPS-QA.yaml Outdated
Comment thread baseline/OSPS-QA.yaml Outdated
@funnelfiasco

funnelfiasco commented Aug 15, 2025 •

Copy link
Copy Markdown
Contributor

Thinking about this a little more, I don't think "Quality" is the right section. That's described as:

Quality focuses on the processes and practices used to ensure the quality and reliability of the project's source code and software assets. These controls help ensure that the project's source code is well maintained, secure, and reliable, reducing the risk of defects or vulnerabilities in the software.

I can see an argument for that, but I don't think it's the most apt. There's no perfect fit for this one, but I'd say "Access Control" is probably the closest?

Access Control focuses on the mechanisms and policies that control access to the project's version control system and CI/CD pipelines. These controls help ensure that only authorized users can access sensitive data, modify repository settings, or execute build and release processes.

@trumant

trumant commented Aug 15, 2025

Copy link
Copy Markdown
Contributor Author

Thinking about this a little more, I don't think "Quality" is the right section. That's described as:

Quality focuses on the processes and practices used to ensure the quality and reliability of the project's source code and software assets. These controls help ensure that the project's source code is well maintained, secure, and reliable, reducing the risk of defects or vulnerabilities in the software.

I can see an argument for that, but I don't think it's the most apt. There's no perfect fit for this one, but I'd say "Access Control" is probably the closest?

Access Control focuses on the mechanisms and policies that control access to the project's version control system and CI/CD pipelines. These controls help ensure that only authorized users can access sensitive data, modify repository settings, or execute build and release processes.

I waivered between those two as well. Thinking of projects implementing gitleaks style pre-commit and the like feels like a process quality issue, whereas deciding whether to manage secrets and credentials and if so, where, how, etc feels like a mix of AC and QA categories.

@evankanderson evankanderson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be in Build & Release, since that is where most of the secrets are used?

funnelfiasco
funnelfiasco previously approved these changes Sep 2, 2025
@trumant
trumant force-pushed the issues/352 branch 2 times, most recently from 8aee21f to 5076c08 Compare September 4, 2025 11:57
@trumant trumant changed the title feat: add control OSPS-QA-08 for secrets management feat: add control OSPS-BR-07 for secrets management Sep 4, 2025
funnelfiasco
funnelfiasco previously approved these changes Sep 4, 2025
This change adds a new control to the Build & Release  control family
that focuses on secure handling and storage of project secrets.

This change closes ossf#352

Signed-off-by: Travis Truman <trumant@gmail.com>
evankanderson
evankanderson previously approved these changes Sep 5, 2025

@evankanderson evankanderson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The recommendation of manual audits for secrets in commit history seems a bit strong for level 1, but I'm reading it as a best practice rather than a requirement.

Comment thread baseline/OSPS-BR.yaml Outdated
Comment thread baseline/OSPS-BR.yaml Outdated
Comment thread baseline/OSPS-BR.yaml
Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>
Signed-off-by: Travis Truman <trumant@gmail.com>
@trumant
trumant dismissed stale reviews from evankanderson and funnelfiasco via 2d30186 September 5, 2025 02:37
Co-authored-by: Evan Anderson <evan.k.anderson@gmail.com>
Signed-off-by: Travis Truman <trumant@gmail.com>
@trumant

trumant commented Sep 5, 2025

Copy link
Copy Markdown
Contributor Author

The recommendation of manual audits for secrets in commit history seems a bit strong for level 1, but I'm reading it as a best practice rather than a requirement.

My intention there was to point out that pre-commit checks are helpful but insufficient and that adding scheduled, automated checks via GHA and likely using the same tool used in pre-commit (gitleaks or similar)

If you read "manual" as implied we should probably copy edit a bit more.

@evankanderson

Copy link
Copy Markdown
Contributor

The recommendation of manual audits for secrets in commit history seems a bit strong for level 1, but I'm reading it as a best practice rather than a requirement.

My intention there was to point out that pre-commit checks are helpful but insufficient and that adding scheduled, automated checks via GHA and likely using the same tool used in pre-commit (gitleaks or similar)

If you read "manual" as implied we should probably copy edit a bit more.

"Periodically audit" suggested a process which was at least partially manual. (Also, what happens if the audit flags a credential? There isn't explicit guidance here, and I can imagine folks trying to expunge content from history, which would be... not great.)

I guess my main concern was requiring an audit process and answering the "leaked credentials" question seem like a higher bar than the rest of the level 1 criteria (and harder to measure).

Signed-off-by: Travis Truman <trumant@gmail.com>
trumant added a commit to ossf/pvtr-github-repo-scanner that referenced this pull request Sep 5, 2025
This change adds support for the newly proposed
controls for secrets management within the project.

BR-07.01 is fully implemented and BR-07.02 is stubbed out

This change relates to the work in ossf/security-baseline#373

Signed-off-by: Travis Truman <trumant@gmail.com>
trumant added a commit to ossf/pvtr-github-repo-scanner that referenced this pull request Sep 5, 2025
This change adds support for the newly proposed
controls for secrets management within the project.

BR-07.01 is fully implemented and BR-07.02 is stubbed out

This change relates to the work in ossf/security-baseline#373

Signed-off-by: Travis Truman <trumant@gmail.com>
trumant added a commit to ossf/pvtr-github-repo-scanner that referenced this pull request Sep 5, 2025
This change adds support for the newly proposed
controls for secrets management within the project.

BR-07.01 is fully implemented and BR-07.02 is stubbed out

This change relates to the work in ossf/security-baseline#373

Signed-off-by: Travis Truman <trumant@gmail.com>

@evankanderson evankanderson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm happy with this as-is, just adding thoughts to see what others are thinking.

Comment thread baseline/OSPS-BR.yaml
applicability:
- Maturity Level 3
recommendation: |
Document how secrets and credentials are managed and used within the project. This should include details on how secrets are stored (e.g., using a secrets management tool), how access is controlled, and how secrets are rotated or updated. Ensure that sensitive information is not hard-coded in the source code or stored in version control systems.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thinking about the removal of audit guidance from BR-07.01 (which I agree with), I wonder whether we should say something here about "credentials where are suspected to have been compromised or leaked should be rotated promptly".

That may be too much detail, but I'm playing back the previous conversations, and I'm wondering if I lost some good in an attempt to broaden accessibility.

trumant added a commit to ossf/pvtr-github-repo-scanner that referenced this pull request Sep 6, 2025
This change adds support for the newly proposed
controls for secrets management within the project.

BR-07.01 is fully implemented and BR-07.02 is stubbed out

This change relates to the work in ossf/security-baseline#373

Signed-off-by: Travis Truman <trumant@gmail.com>
@funnelfiasco
funnelfiasco merged commit 82af014 into ossf:main Sep 15, 2025
5 checks passed
trumant added a commit to ossf/pvtr-github-repo-scanner that referenced this pull request Sep 19, 2025
This change adds support for the newly proposed
controls for secrets management within the project.

BR-07.01 is fully implemented and BR-07.02 is stubbed out

This change relates to the work in ossf/security-baseline#373

Signed-off-by: Travis Truman <trumant@gmail.com>
trumant added a commit to ossf/pvtr-github-repo-scanner that referenced this pull request Sep 21, 2025
* feat: add support for BR-07.01 and BR-07.02

This change adds support for the newly proposed
controls for secrets management within the project.

BR-07.01 is fully implemented and BR-07.02 is stubbed out

This change relates to the work in ossf/security-baseline#373

Signed-off-by: Travis Truman <trumant@gmail.com>

* Update evaluation_plans/osps/build_release/evaluations.go

Co-authored-by: Jason Meridth <35014+jmeridth@users.noreply.github.com>

* Update data/security-posture.go

Co-authored-by: Jason Meridth <35014+jmeridth@users.noreply.github.com>

---------

Signed-off-by: Travis Truman <trumant@gmail.com>
Co-authored-by: Jason Meridth <35014+jmeridth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a control for secrets management

4 participants