Skip to content

docs(security): add initial security policy#3290

Merged
Enselic merged 2 commits intosharkdp:masterfrom
janderssonse:fix/add-security-policy
Aug 27, 2025
Merged

docs(security): add initial security policy#3290
Enselic merged 2 commits intosharkdp:masterfrom
janderssonse:fix/add-security-policy

Conversation

@janderssonse
Copy link
Copy Markdown
Contributor

@janderssonse janderssonse commented May 11, 2025

This PR adds a SECURITY.md file, battle tested in other projects and orgs, (the construct is CCO ie public domain, for example from here https://raw.githubusercontent.com/itiquette/git-provider-sync/refs/heads/main/SECURITY.md so just reuse)

A SECURITY.md would help anyone assessing the project for use, give a hint of how it handles critical no public security issues, and give anyone a clear instruction on how to report them non public.

IE, for someone thinking about using bat in an organisation or privately it would give an extra trust factor.

This policy basically says "send your findings, and we will see if we handle them, we will notify you".

Besides, being a good FOSS practice, makes the project look more professional and it is heavily supported by GitHub https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file etc as one of the community health files, so it will pop up automatically in the ui for the end user.

Examples:
Security Tab in project front will be added automatically
Skärmbild från 2025-05-11 05-57-27

Security Policy in the top right corner of UI will be added automatically

Skärmbild från 2025-05-11 05-58-05

Security Policy under Security Overview for the project will have the Security Policy green and enabled.
Skärmbild från 2025-05-11 05-58-23

NOTE: there is a <...> in the text, where the preferred channel for reporting should be added I left that for you, (or tell me what to add there, and I'll rebase with that).

NOTE: I had this in multiple orgs and projects over the years. Only once I had a report, so I dont think one should be worry about getting to much reports from this, this is at least my experience.

@janderssonse
Copy link
Copy Markdown
Contributor Author

It fails without a changelog entry, but I think this applies (I see this as docs). >[!NOTE]

For PRs, a CI workflow verifies that a suitable changelog entry is
added. If such an entry is missing, the workflow will fail. If your
changes do not need an entry to the changelog (see above), that
workflow failure can be disregarded.

Comment thread SECURITY.md Outdated
- Vulnerabilities will be handled on a best-effort basis.
- You may request an advance copy of the patched release, but we cannot guarantee early access before the public release.
- You will be notified via email simultaneously with the public announcement.
- We will respond within a few weeks to confirm whether your report has been accepted or rejected.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd like to point out that bat comes with no warranty, and I don't want to make any promises about timeliness

I don't really think there is a problem with our current place and instruction found at https://github.com/sharkdp/bat?tab=readme-ov-file#security-vulnerabilities

Copy link
Copy Markdown
Contributor Author

@janderssonse janderssonse Aug 26, 2025

Choose a reason for hiding this comment

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

@Enselic Then we should just remove the last note /respond paragraph/ maybe. I don't see there are any obligations in this, on purpose. Best-effort means that doing nothing is an option too (no warranty). There is nothing wrong the current instruction you link too, but this community file is an idiomatic way (like I show with examples in the PR-text - ie both acknowledged by platforms like GitHub, and an end user would expect to look for this information, in a file with this name. )(SECURITY.md).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As a first step we could put our current instruction in the separate file and get that merged

Copy link
Copy Markdown
Contributor Author

@janderssonse janderssonse Aug 26, 2025

Choose a reason for hiding this comment

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

I can update this PR suggestion with a PR which is a mix of the both and be careful to remove anything which even remotely implies any promises. (The We will respond... paragraph, or soften it even more... In most cases, we will .. friendly, but no promises?). Sound good?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Lets first do it minimally

and to be honest I don't see the point of adding more info

if someone does not know how to write a security bug report, they probably should not

(If it's too easy we end up in https://daniel.haxx.se/blog/2025/07/14/death-by-a-thousand-slops/)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I simplified it and rebased, now it is almost like the original information from the README. Please have a look.

@Enselic Enselic added the waiting-on-author Progress on this PR is blocked mostly because we are waiting on the author of the PR to do something label Aug 16, 2025
@Enselic
Copy link
Copy Markdown
Collaborator

Enselic commented Aug 26, 2025

Closing for now to keep PR inbox clean but we can keep discussing here if needed.

@Enselic Enselic closed this Aug 26, 2025
@Enselic Enselic reopened this Aug 26, 2025
@janderssonse janderssonse force-pushed the fix/add-security-policy branch from 9eceb9d to 19cf695 Compare August 27, 2025 06:12
Copy link
Copy Markdown
Collaborator

@Enselic Enselic left a comment

Choose a reason for hiding this comment

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

Like I said, I prefer a minimal change.

I'd also like to keep the header in the README.md to that old links don't break, but it should reference the SECURITY.md file.

Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md
@janderssonse janderssonse force-pushed the fix/add-security-policy branch from 19cf695 to ef4940d Compare August 27, 2025 16:57
@janderssonse
Copy link
Copy Markdown
Contributor Author

janderssonse commented Aug 27, 2025

Like I said, I prefer a minimal change.

I'd also like to keep the header in the README.md to that old links don't break, but it should reference the SECURITY.md file.

Please have a look again:)

Signed-off-by: Josef Andersson <janderssonse@proton.me>
@janderssonse janderssonse force-pushed the fix/add-security-policy branch from ef4940d to 67fc0d9 Compare August 27, 2025 17:01
Removed the thank you note for reporting vulnerabilities.
Copy link
Copy Markdown
Collaborator

@Enselic Enselic 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 update, let's merge

@Enselic Enselic enabled auto-merge (squash) August 27, 2025 18:27
@Enselic Enselic merged commit 6772225 into sharkdp:master Aug 27, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-author Progress on this PR is blocked mostly because we are waiting on the author of the PR to do something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants