Commit Graph

66 Commits

Author SHA1 Message Date
Appu
e7ef60d7fe
📖 Add information for pinning manfest lists (#1918)
* Add information for pinning manfest lists

Signed-off-by: Appu Goundan <appu@google.com>

* Update checks.md
2022-05-17 10:36:57 -07:00
noamd
5860896619 detect workflow_run as a dangerous trigger 2022-04-06 07:22:54 -05:00
Carlos Tadeu Panato Junior
7dcb3cb3e2
checks: add GitHub Webhook check (#1675)
* checks: add GitHub Webhook check

Signed-off-by: Carlos Panato <ctadeu@gmail.com>

* update per feedback

Signed-off-by: cpanato <ctadeu@gmail.com>

* add evaluation code

Signed-off-by: cpanato <ctadeu@gmail.com>

* add feature gate check

Signed-off-by: cpanato <ctadeu@gmail.com>

* fix lint

Signed-off-by: cpanato <ctadeu@gmail.com>
2022-03-31 07:29:59 -07:00
Chris McGehee
76105194da
📖 Adding missing documentation for Token-Permissions (#1656)
* Adding missing documentation for Token-Permissions

* Make documentation for `actions` more accurate

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
2022-02-25 22:47:11 +00:00
Romain Dauby
33f80c93dc Fix golangci-lint issues 2022-02-19 15:56:34 -06:00
Azeem Shaikh
1c95237e4a
Only run allowed checks in different modes (#1579)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2022-02-07 16:49:49 -08:00
Azeem Shaikh
4581c363cf
Remove ListMergedPRs API (#1566)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2022-02-03 00:01:35 +00:00
laurentsimon
cbbfebb0e8
Mention renovatebot's settings (#1575)
* uupdate doc

* docs/checks/internal/checks.yaml: updated
docs/checks.md: updated
2022-01-31 15:41:20 -08:00
laurentsimon
40a9d48c91
Link to responsible disclosure guidelines in Security-Policy remediation doc (#1545)
* refer to repsonsible disclosure guidelines

* typo
2022-01-27 17:21:34 -05:00
Chris McGehee
b6cba86f72
🐛 Issue activity only counts if done by a maintainer (#1515)
* Issue activity only counts if done by a maintainer

* -Using pointer so that if Github API doesn't return a value for a field, it can be nil
- Updating AuthorAssociation to use an enum

Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2022-01-24 16:12:54 +00:00
Hallgeir Holien
062e33ba29
📖 Dependabot config file link (#1498)
* Dependabot config file link

It seems like dependabot.com is gone and the documentation of configuration file has now moved to https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

* Updated dependabot docs link

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-01-21 08:12:22 -08:00
Azeem Shaikh
f2c57d2590 Migrate to v4 2022-01-12 14:12:09 -06:00
laurentsimon
48f10693e0
add stepsec (#1438) 2022-01-05 22:53:50 +00:00
laurentsimon
5613b68191
fix linnks (#1430) 2021-12-31 23:26:14 +00:00
laurentsimon
ea7c9c1d32
update doc (#1429) 2021-12-28 20:00:53 -06:00
laurentsimon
46e94eb925
[DRAFT: RAW]: Security policy support (#1372)
* raw sec policy

* missing file

* fix validation of check.yml

* updates

* comments

* dea code

* comments
2021-12-14 23:51:42 +00:00
asraa
cfa1593e1c
Add Script Injection to Dangerous-Workflow (#1368)
* add dangerous workflow pattern script injection

Signed-off-by: Asra Ali <asraa@google.com>

* add more tests

Signed-off-by: Asra Ali <asraa@google.com>

* update laurent comments

Signed-off-by: Asra Ali <asraa@google.com>
2021-12-09 13:53:55 -08:00
laurentsimon
6e013cf67d
Token-Permission: Allow top level permissions not defined if all run level permissions are (#1356)
* doc

* allow non defined top level

* fix

* e2e fix

* linter
2021-12-08 01:18:28 +00:00
Chen
be9a6234b5
Update the Risk of dangerous-workflow (#1361)
Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2021-12-07 18:00:36 +00:00
Batuhan Apaydın
1eb4d0e73e Fix deadlink for security policy
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
Co-authored-by: Furkan Türkal <furkan.turkal@trendyol.com>
2021-12-05 11:26:29 -06:00
laurentsimon
b323cded04
🐛 checks.yml not sync'ed with checks.md (#1360)
* update docs

* update

* remove file

* remove  improper commit

* fix
2021-12-04 08:56:50 -06:00
laurentsimon
b8d7a6b722
make critical (#1348) 2021-12-03 17:55:54 +00:00
Nanik
45b5a35020
Add new checking for license file availability (#1178)
* Add checking logic inside license_check.go
    * Add test case license_check_test.go
    * Add check information inside checks.yaml
2021-12-03 09:28:27 -08:00
Evgeny Vereshchagin
3cf8b2bfdb
docs: be more specific about what Dependabot brings with it (#1336)
It would have helped me to decide whether I needed it or not

Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2021-12-01 17:56:28 +00:00
laurentsimon
a500ba9e83
fix doc (#1332) 2021-11-23 00:43:13 +00:00
laurentsimon
fd8731481f
Update score for branch protection with levels (#1287)
* draft

* draft2

* fix

* fix

* fix

* test

* linter

* comments

* comment

* update doc

* comments
2021-11-20 01:42:21 +00:00
Evgeny Vereshchagin
9d2976592f
Signed-Releases: really look for *.sign files (#1298)
With this patch applied projects like dracut pass the check:
```
  "checks": [
    {
      "details": [
        "Debug: GitHub release found: 055",
        "Info: signed release artifact: dracut-055.tar.sign: https://api.github.com/repos/dracutdevs/dracut/releases/assets/37635937",
        "Debug: GitHub release found: 054",
        "Info: signed release artifact: dracut-054.tar.sign: https://api.github.com/repos/dracutdevs/dracut/releases/assets/36958052",
        "Debug: GitHub release found: 053",
        "Info: signed release artifact: dracut-053.tar.sign: https://api.github.com/repos/dracutdevs/dracut/releases/assets/32484038",
        "Debug: GitHub release found: 052",
        "Info: signed release artifact: dracut-052.tar.sign: https://api.github.com/repos/dracutdevs/dracut/releases/assets/32130796",
        "Debug: GitHub release found: 051",
        "Info: signed release artifact: dracut-051.tar.sign: https://api.github.com/repos/dracutdevs/dracut/releases/assets/31933850"
      ],
      "score": 10,
      "reason": "5 out of 5 artifacts are signed -- score normalized to 10",
      "name": "Signed-Releases",
```
2021-11-20 00:55:08 +00:00
Azeem Shaikh
2375ae2812
Add a OssFuzzRepoClient (#1280)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-11-17 03:04:37 +00:00
asraa
1050b1cd60
Add dangerous workflow check with untrusted code checkout pattern (#1168)
* add dangerous workflow check with untrusted code checkout pattern

Signed-off-by: Asra Ali <asraa@google.com>

* update

Signed-off-by: Asra Ali <asraa@google.com>

* add env var

Signed-off-by: Asra Ali <asraa@google.com>

* fix comment

Signed-off-by: Asra Ali <asraa@google.com>

* add repos git checks.yaml

Signed-off-by: Asra Ali <asraa@google.com>

* update checks.md

Signed-off-by: Asra Ali <asraa@google.com>

* address comments

Signed-off-by: Asra Ali <asraa@google.com>

* fix merge

Signed-off-by: Asra Ali <asraa@google.com>

* add delete

Signed-off-by: Asra Ali <asraa@google.com>

* update docs

Signed-off-by: Asra Ali <asraa@google.com>

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2021-11-15 20:18:10 +00:00
Azeem Shaikh
51de6b6e5d
Check for issue activity in Maintained (#1251)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-11-12 22:16:22 +00:00
Eng Zer Jun
177502552a
🌱 Move from io/ioutil to io and os packages (#1250)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <zerjun@eta-hd.com>

Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
2021-11-12 19:34:46 +00:00
Evgeny Vereshchagin
6a2fb2edc2
Add LGTM to the SAST check (#1232)
According to https://github.com/apps/lgtm-com
"LGTM is a code analysis platform for identifying vulnerabilities early and preventing
them from reaching production". It's used by `systemd`, `lxc` and a lot of other large
open source projects. The check is
still kind of broken in the sense that it fails to detect
projects where every PR is analyzed by LGTM before getting merged
but it's better than nothing I guess.

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2021-11-10 10:09:11 -08:00
laurentsimon
ae271b4513
🐛 Validate doc on pre-submit (#1235)
* validate doc on pre-submit

* typo
2021-11-10 16:56:44 +00:00
laurentsimon
af594d3921
spelling (#1219) 2021-11-04 19:02:07 +00:00
laurentsimon
8a83a81fd7
Validate check.yaml's repo interface support (#1210)
* draft

* validate

* comment

* commments
2021-11-02 12:22:37 -07:00
laurentsimon
a6d298a60a
Use checks.yaml to store which repo types are supported by each check (#1195)
* draft

* draft 2

* remove enum

* update

* mock doc

* fix
2021-11-02 01:43:22 +00:00
Romain Dauby
c26bea648d
📖 Minor fixes to markdown links (#1141)
* Minor fixes to markdown links

* Minor fix generate docs
2021-10-19 12:14:11 -07:00
Naveen
6c1c789dc5
🌱 v3 upgrade changes (#1118)
v3 go.mod changes
2021-10-07 18:16:01 -05:00
olivekl
aaff0e530c
📖 Edit and rework checks.md (via checks.yaml and main.go) (#1114)
* Update checks.yaml to generate new checks.md docs

* Update main.go

Update overview text and add link

* -m "update TODO for Contrib and Signed-Releases"

* -m "Add admin setting  info to Branch-Protection"

* -m "generate docs, fix typos"

* -m "generate docs"

* -m "add links, small edits to checks.yml"

* -m "generate docs.md"

* Clarify Pinned-Dependencies remediation

* "Generate docs"

* "Add admin-only Branch-Protection checks"

* "Regenerate docs"

Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2021-10-06 22:07:49 +00:00
David A. Wheeler
9df865c4f8
Regenerate docs/checks.md (#1061)
This commit commits the result of `make generate-docs`,
producing an updated `docs/checks.md` file, now that the
source documentation files have been changed.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
2021-09-24 09:32:11 -07:00
David A. Wheeler
aa93ac2329
Modify the text to acknowledge GitHub != universe (#1037)
There are many source repository hosting services (forges),
not just GitHub. This generalizes the requirements, e.g., from:

> Determines if the project's GitHub workflows follow the principle of least privilege.

to:

> Determines if the project's workflows follow the principle of least privilege.

Scorecard doesn't currently *implement* checks in most cases for
systems other than GitHub, so acknowledge that as a limitation, instead
of implying that it's the one true way to implement secure software.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2021-09-23 00:18:58 +00:00
laurentsimon
39bd00c359
Add aggregated score (#1046)
* ag scores

* fix

* CSV and string

* comments

* updates

* changes

* fixes
2021-09-21 22:30:25 +00:00
David A. Wheeler
bc5d7a8d4b
📖 Improve text on Packaging (#1035)
* Improve text on Packaging

Make various improvements to the text on packaging.

* The original text assumes that only software developers install software
  packages, which is absurd; end-users install software packages all
  the time.
* The original text seemed to assume that there are only
  language-level packages, but system-level packages & containers
  are a thing :-). At least acknowledge them.
  Also, this doesn't make sense in some cases
  (e.g., software specific to one website that's updated through commits,
  or IoT software where there are no "packages" - you
  upload the entire image); that should be admitted.
* Fix main text to stop using "you/your" to mean "project developer".
  There are at least two *different* readers: (1) developers of the project
  being measured and (2) potential users of the project being measured.
  Many users of scorecard will be #2, they'll
  reading scorecard results to decide if they want to use the software
  being measured. So don't say "you" and assume that "you" means
  project developers.  I left "you" meaning "project developers"
  inside remediation, under the assumption that this was remdediation
  text for project developers.
  To be fair, *users* of software can also sometimes
  take remediation steps; that might be worth adding as its own
  section if we text to add there (e.g., `user_remediation`).

I have intentionally not run `make generate-docs` as that would add other
irrelevant changes.  Instead, after this PR is accepted there should be a
`make generate-docs` & a pull of *that*.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

* Add note about filing an issue

Add note about filing an issue if scorecard fails to detect
the packaging mechanism, per review by @naveensrinivasan (thanks!).

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
2021-09-17 08:35:53 -05:00
David A. Wheeler
45fb77983b
📖 Improve explanation about multiple reviewers (and their lack) (#1017)
* Improve explanation about multiple reviewers (and their lack)

The current text oversells the value of multiple
reviewers, and falsely assumes it's always possible.
I'm a *huge* fan of having a second reviewer, but it
obviously *can't* be done when there's only 1 active participant.
Even projects with multiple active participants find it
difficult in practice if there aren't many participants.
Also, multiple reviewers guarantee nothing; the other
"reviewers" might be sock puppets or other subverted accounts.

So yes, encourage review, but let's make it clear that it
can't prevent all problems & that some projects cannot currently
do it. Put the details in Code-Review, where it best belongs.
Also, projects *can* try to remediate the lack of active participants,
so give them some practical remediation steps.

Finally: "pull request" is a GitHub-specific term.  GitLab, SourceForge,
and many other forges instead use the term "merge request".  So in the
interest of not locking into one specific proprietary service, let's
include a more generic term.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

* Make fixes based on review

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

* Explain how to get top score in Contributors

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2021-09-16 20:39:43 +00:00
David A. Wheeler
30cae86ab0
📖 Warn when checks are prone to false negatives (#1019)
* Warn when checks are prone to false negatives

Automated tools normally have some false negatives,
some false positives, or both. However, some scorecard criteria
are *especially* prone to false negatives (where a
project meets the criterion but the tool says it doesn't).

This commit adds warning text about false negatives for
criteria that are especially prone to false negatives.
In all cases the problem is that there are *many* ways to
implement the criterion, so while the tool may detect some
cases, there are countless other situations it will fail to detect.
While this doesn't *fix* the problem, warning the humans
will encourage them to double-check these criteria before
making decisions. Sometimes this is the best you can do, and
it's better than not having a warning.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

* Fix text per pull request feedback

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
2021-09-16 00:21:17 +00:00
David A. Wheeler
8b7da7c472
📖 Improve rationale for Binary-Artifacts (#1016)
* Improve rationale for Binary-Artifacts

I'm fine with prohibiting binary executables, but
the *rationale* for doing this was completely unclear.

This commit rewrites the rationale to explain, in hopefully
a better way, why they can be a problem.

I prefer "executable" over "binary".
On digital computers, all data (including source code) are binaries :-).
In addition, some executables are simultaneously executables
and source code, e.g., shell scripts.
So I think what is meant here is a "generated binary".

I don't really think this merits a "High" level, but that's
a different dicussion.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

* Tweak Binary-Artifacts rationale

Tweak Binary-Artifacts text based on comments from
@naveensrinivasan.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2021-09-14 23:48:15 +00:00
David A. Wheeler
646b339f44
Explain that active maintenance isn't always needed (#1013)
A lack of active maintenance isn't always an indicator of problems.
It'd be surprising if the JavaScript IsEven package got changes
every week.

Make that clearer in the check text.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2021-09-14 18:18:27 +00:00
David A. Wheeler
6868fe6f93
Note that pinning is a way to mitigate dependency confusion (#1012)
One reason to pin dependencies is that it's one way to
counter dependency confusion attacks; mention that.
Pinning dependencies is definitely not the *only* way, and
it's not even clear it's the best way, but it's a legitimate
reason to pin dependencies in applications.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
2021-09-14 11:07:02 -07:00
David A. Wheeler
afb01f47f7
Fix CII Best Practices badge info (#1010)
This fixes the current misleading text about the CII
Best Practices badge. It currently says that "This badge tells us the
repo maintainers are aware of best development practices." - but
merely being "aware" doesn't earn a passing badge.
There's a long list of requirements to earn a passing badge;
we should give a sense of them here.
Note that this only checks for "passing", not silver or gold.

Note: This replaces a previous (messed-up) pull request #1009.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
2021-09-13 21:40:56 -07:00
David A. Wheeler
aa2ed459b8
📖 Docs: Pinned dependency doc 2 (#1004)
* Modify pinned dependency docs in checks.yaml

The previous changes about pinned dependencies
modified the generated file checks.md, not the source
file checks.yaml. This commit modifies the correct
source file checks.yaml instead. It also tweaks the
text further (while we're at it).

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

* Check in result of make generate-docs

We've modified checks.yaml to improve the pinned
dependency discussion. This checks in the result of
`make generate-docs` so that the docs are visible
on GitHub.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>

Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2021-09-13 18:35:20 -07:00