Skip to content

Commit 8493b0b

Browse files
inferno-chromiumnaveensrinivasan
authored andcommitted
Add remediation steps for various checks.
1 parent 93373f7 commit 8493b0b

File tree

2 files changed

+115
-21
lines changed

2 files changed

+115
-21
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ The following checks are all run against the target project:
149149
| Branch-Protection | Does the project use [Branch Protection](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/about-protected-branches) ? |
150150
| Packaging | Does the project build and publish official packages from CI/CD, e.g. [GitHub Publishing](https://docs.github.com/en/free-pro-team@latest/actions/guides/about-packaging-with-github-actions#workflows-for-publishing-packages) ? |
151151

152-
To see detailed information on how each check works, see the [check-specific documentation page](checks.md).
152+
To see detailed information about each check and remediation steps,
153+
check out the [checks documentation page](checks.md).
153154

154155
If you'd like to add a check, make sure it is something that meets the following criteria:
155156

checks.md

Lines changed: 113 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,163 @@
11
# Check Documentation
22

3-
This page contains information on how each check works and calculates scores.
4-
All of these checks are basically "best-guesses" currently, and operate on a set of heuristics.
3+
This page contains information on how each check works and provide remediation
4+
steps to fix the failure. All of these checks are basically "best-guesses"
5+
currently, and operate on a set of heuristics.
56

6-
They are all subject to change, and have much room for improvement!
7-
If you have ideas for things to add, or new ways to detect things, please contribute!
7+
They are all subject to change, and have room for improvement!
8+
If you have ideas for things to add, or new ways to detect things,
9+
please contribute!
810

911
## Security-MD
1012

11-
This check tries to determine if a project has published security policies.
12-
It works by looking for a file named `SECURITY.md` (case-insensitive) in a few well-known directories.
13+
This check tries to determine if a project has published a security policy.
14+
It works by looking for a file named `SECURITY.md` (case-insensitive) in a
15+
few well-known directories.
16+
17+
**Remediation steps**:
18+
- Place a security policy file `SECURITY.md` in the root directory of your
19+
repository. This makes it easily discoverable by a vulnerability reporter.
20+
- The file should contain information on what constitues a vulnerability and
21+
a way to report it securely (e.g. issue tracker with private issue support,
22+
encrypted email with a published public key).
1323

1424
## Contributors
1525

16-
This check tries to determine if a project has a set of contributors from multiple companies.
17-
It works by looking at the authors of recent commits and checking the `Organization` field on the GitHub user profile.
26+
This check tries to determine if a project has a set of contributors from
27+
multiple companies. It works by looking at the authors of recent commits and
28+
checking the `Organization` field on the GitHub user profile.
29+
30+
**Remediation steps**:
31+
- There is *NO* remediation work needed here. This is just to provide some
32+
insights on which organization(s) have contributed to the project and
33+
making trust decision based on that.
1834

1935
## Frozen-Deps
2036

21-
This check tries to determine if a project has declared and pinned its dependencies.
22-
It works by looking for a set of well-known package management lock files.
37+
This check tries to determine if a project has declared and pinned its
38+
dependencies. It works by looking for a set of well-known package management
39+
lock files.
40+
41+
**Remediation steps**:
42+
- Declare all your dependencies with specific versions in your package format
43+
file (e.g. `package.json` for npm, `requirements.txt` for python). For C/C++,
44+
check in the code from a trusted source and add a `README` on the specific
45+
version used (and the archive SHA hashes).
46+
- If the package manager supports lock files (e.g. `package-lock.json` for npm),
47+
make sure to check these in the source code as well. These files maintain
48+
signatures for the entire dependency tree and saves from future exploitation
49+
in case the package is compromised.
2350

2451
## Signed-Tags
2552

2653
This check looks for cryptographically signed tags in the git history.
2754

55+
**Remediation steps**:
56+
- Generate a new signing key.
57+
- Add your key to your source hosting provider.
58+
- Configure your key and email in git.
59+
- Publish the tag and then sign it with this key.
60+
- For GitHub, check out the steps
61+
[here](https://docs.github.com/en/github/authenticating-to-github/signing-tags#further-reading).
62+
2863
## Signed-Releases
2964

30-
This check tries to determine if a project cryptographically signs release artifacts.
31-
It works by looking for well-known filenames within recently published GitHub releases.
65+
This check tries to determine if a project cryptographically signs release
66+
artifacts. It works by looking for well-known filenames within recently
67+
published GitHub releases.
68+
69+
**Remediation steps**:
70+
- Publish the release.
71+
- Generate a signing key.
72+
- Download the release as an archive locally.
73+
- Sign the release archive with this key (should output a signature file).
74+
- Attach the signature file next to the release archive.
75+
- For GitHub, check out the steps
76+
[here](https://wiki.debian.org/Creating%20signed%20GitHub%20releases).
3277

3378
## CI-Tests
3479

35-
This check tries to determine if the project run tests before pull requests are merged.
36-
It works by looking for a set of well-known CI-system names in GitHub `CheckRuns` and `Statuses`.
80+
This check tries to determine if the project run tests before pull requests are
81+
merged. It works by looking for a set of well-known CI-system names in GitHub
82+
`CheckRuns` and `Statuses`.
83+
84+
**Remediation steps**:
85+
- Check-in scripts that run all the tests in your repository.
86+
- Integrate those scripts with a CI/CD platform that runs it on every pull
87+
request (e.g.
88+
[GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions),
89+
[Prow](https://github.com/kubernetes/test-infra/tree/master/prow),
90+
etc).
3791

3892
## Code-Review
3993

40-
This check tries to determine if a project requires code review before pull requests are merged.
41-
It works by looking for a set of well-known code review system results in GitHub Pull Requests.
94+
This check tries to determine if a project requires code review before
95+
pull requests are merged. It works by looking for a set of well-known code
96+
review system results in GitHub Pull Requests.
97+
98+
**Remediation steps**:
99+
- Follow security best practices by performing strict code reviews for every
100+
new pull request.
101+
- Make "code reviews" mandatory in your repository configuration.
102+
E.g. [GitHub](https://docs.github.com/en/github/administering-a-repository/about-protected-branches#require-pull-request-reviews-before-merging).
103+
- Enforce the rule for administrators / code owners as well.
104+
E.g. [GitHub](https://docs.github.com/en/github/administering-a-repository/about-protected-branches#include-administrators)
42105

43106
## CII-Best-Practices
44107

45108
This check tries to determine if the project has a [CII Best Practices Badge](https://bestpractices.coreinfrastructure.org/en).
46109
It uses the URL for the Git repo and the CII API.
47110

111+
**Remediation steps**:
112+
- Sign up for the [CII Best Practices program](https://bestpractices.coreinfrastructure.org/en).
113+
48114
## Pull-Requests
49115

50-
This check tries to determine if the project requires pull requests for all changes to the default branch.
51-
It works by looking at recent commits and using the GitHub API to search for associated pull requests.
116+
This check tries to determine if the project requires pull requests for all
117+
changes to the default branch. It works by looking at recent commits and using
118+
the GitHub API to search for associated pull requests.
119+
120+
**Remediation steps**:
121+
- Always open a pull request for any change you intend to make, big or small.
122+
- Make "pull requests" mandatory in your repository configuration.
123+
E.g. [GitHub](https://docs.github.com/en/github/administering-a-repository/about-protected-branches#require-pull-request-reviews-before-merging)
124+
- Enforce the rule for administrators / code owners as well.
125+
E.g. [GitHub](https://docs.github.com/en/github/administering-a-repository/about-protected-branches#include-administrators)
52126

53127
## Fuzzing
54128

55129
This check tries to determine if the project uses a fuzzing system.
56-
It currently works by checking if the repo name is in the [OSS-Fuzz](https://github.com/google/oss-fuzz) project list.
130+
It currently works by checking if the repo name is in the
131+
[OSS-Fuzz](https://github.com/google/oss-fuzz) project list.
132+
133+
**Remediation steps**:
134+
- Integrate the project with OSS-Fuzz by following the instructions
135+
[here](https://google.github.io/oss-fuzz/).
57136

58137
## SAST
59138

60139
This check tries to determine if the project uses static code analysis systems.
61140
It currently works by looking for well-known results ([CodeQL](https://securitylab.github.com/tools/codeql), etc.) in GitHub pull requests.
62141

142+
**Remediation steps**:
143+
- Run CodeQL checks in your CI/CD by following the instructions
144+
[here](https://github.com/github/codeql-action#usage).
145+
63146
## Active
64147

65148
This check tries to determine if the project is still "actively maintained".
66-
It currently works by looking for releases or commits within the last 90 days.
149+
It currently works by looking for commits within the last 90 days.
150+
151+
**Remediation steps**:
152+
- There is *NO* remediation work needed here. This is just to indicate your
153+
project activity and maintenance commitment.
67154

68155
## Branch-Protection
69156

70157
This check tries to determine if the project has branch protection enabled.
158+
159+
**Remediation steps**:
160+
- Enable branch protection settings in your source hosting provider to avoid
161+
force pushes or deletion of your important branches.
162+
- For GitHub, check out the steps
163+
[here](https://docs.github.com/en/github/administering-a-repository/managing-a-branch-protection-rule).

0 commit comments

Comments
 (0)