|
1 | 1 | # Check Documentation |
2 | 2 |
|
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. |
5 | 6 |
|
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! |
8 | 10 |
|
9 | 11 | ## Security-MD |
10 | 12 |
|
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). |
13 | 23 |
|
14 | 24 | ## Contributors |
15 | 25 |
|
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. |
18 | 34 |
|
19 | 35 | ## Frozen-Deps |
20 | 36 |
|
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. |
23 | 50 |
|
24 | 51 | ## Signed-Tags |
25 | 52 |
|
26 | 53 | This check looks for cryptographically signed tags in the git history. |
27 | 54 |
|
| 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 | + |
28 | 63 | ## Signed-Releases |
29 | 64 |
|
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). |
32 | 77 |
|
33 | 78 | ## CI-Tests |
34 | 79 |
|
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). |
37 | 91 |
|
38 | 92 | ## Code-Review |
39 | 93 |
|
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) |
42 | 105 |
|
43 | 106 | ## CII-Best-Practices |
44 | 107 |
|
45 | 108 | This check tries to determine if the project has a [CII Best Practices Badge](https://bestpractices.coreinfrastructure.org/en). |
46 | 109 | It uses the URL for the Git repo and the CII API. |
47 | 110 |
|
| 111 | +**Remediation steps**: |
| 112 | +- Sign up for the [CII Best Practices program](https://bestpractices.coreinfrastructure.org/en). |
| 113 | + |
48 | 114 | ## Pull-Requests |
49 | 115 |
|
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) |
52 | 126 |
|
53 | 127 | ## Fuzzing |
54 | 128 |
|
55 | 129 | 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/). |
57 | 136 |
|
58 | 137 | ## SAST |
59 | 138 |
|
60 | 139 | This check tries to determine if the project uses static code analysis systems. |
61 | 140 | It currently works by looking for well-known results ([CodeQL](https://securitylab.github.com/tools/codeql), etc.) in GitHub pull requests. |
62 | 141 |
|
| 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 | + |
63 | 146 | ## Active |
64 | 147 |
|
65 | 148 | 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. |
67 | 154 |
|
68 | 155 | ## Branch-Protection |
69 | 156 |
|
70 | 157 | 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