Commit Graph

44 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
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
laurentsimon
48f10693e0
add stepsec (#1438) 2022-01-05 22:53:50 +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
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
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
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
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
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
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
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
David A. Wheeler
ba53081aeb
Tweak "pinned dependency" discussion (#999)
* Tweak "pinned dependency" discussion

The Pinned-Dependency discussion has a number of problems.

First, it doesn't even define the term. Let's fix that.

Next, it *WAY* oversells what
pinned dependencies can do for you. All they do is fix the
dependency. They don't really prevent compromised dependencies;
if you pin an already-compromised dependency, you make it worse,
because now you don't automatically update to the corrected
dependency if there was a later non-malicious version.
It often slows automated security updates, so they can actually
cause a *reduction* in security (since most updates *fix*
security vulnerabilities instead of introducing a compromise).

In particular, pinned dependencies are usually a *good* idea for
applications but you should NOT pin dependencies in libraries.
If a library pins to a version, and the library is only updated
1/year, and the ecosystem requires only 1 version of a library
(true for practically all except JavaScript), users can't update any
dependencies more than 1/year (and in practice they'll never be aligned).
At least a hint of the downsides of pinning should be admitted here.
For a larger discussion, see, for example,
https://docs.google.com/document/d/1x_VrNtXCup75qA3glDd2fQOB2TakldwjKZ6pXaAjAfg/edit#

A better argument for pinning is the reproducibility it brings
when using pinning inside an application. I suggest focusing on
that first.

Pinned dependencies are still typically a good idea for applications,
but they should NOT be oversold.

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

* Note GitHub's dependency graph

This is mentioned in the README, but those details should really
be here in the detailed documentation, not in the whole-project README.

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

* Minor grammar fixes

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

* Note that pinned-dependencies should only apply to apps

The scorecard project only intends to enforce pinned
dependencies on applications (not libraries), as
noted here:
https://github.com/ossf/scorecard/issues/689

However, that's not documented in docs/checks.md!

This commit makes it clear that this is *intended* to
only apply to applications. It also notes that it's not
possible for an automated tool to always categorize software
correctly (especially when a project is both).

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

Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
2021-09-12 23:55:39 +00:00
Naveen
2ae8910579
📖 Fixed the deadlink to the documentation (#963)
Fixed the deadlink to the documentation
2021-09-04 19:21:31 +00:00
Azeem Shaikh
9a1978a051
Use RefUpdateRule in BranchProtection check (#936)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-08-30 23:14:42 +00:00
laurentsimon
9eb7929ebc
🐛 Address friction logs' comments (#899)
* fixes

* fix

* fix

* fixes

* doc

* missing file

* fixes

* comments

* typo
2021-08-25 21:02:23 +00:00
laurentsimon
b3a3f7e217
SARIF 2: add short description to checks.yml (#848)
* short desc

* validate new field

* typos

* comments

* fixed
2021-08-16 15:42:55 +00:00
Azeem Shaikh
d4701c4a4e
Delete Signed-Tags check from Scorecard (#851)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-08-12 22:26:50 +00:00
Naveen
e160d4a273
📖 Fixed the typos and rephrased some (#849)
*  Fixed a few typos
    *  Rephrased a few statements.
2021-08-12 15:59:01 -04:00
Johan Brandhorst-Satzkorn
a3ae21f7c0
Fix minisign file ending example (#807)
The minisign project uses *.minisig signature files, which
is correctly searched for by the implementation logic
in signed_releases.go, however, the docs use
"*.minisign", which will confuse users.

Correct the docs to use the "*.minisig" file extension.

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2021-08-03 21:35:13 +00:00
laurentsimon
b2b37161f3
Improve token permission check (#800)
* draft

* draft 2

* draft3

* fix e2e

* comment

* comment

* check codeql

* missing files

* comments

* nit

* update msg

* msg

* nit

* nit

* msg

* e2e

* update doc
2021-08-03 00:56:45 +00:00
Azeem Shaikh
1e6d99eb20
Remove PullRequest check (#771)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-07-29 20:58:36 +00:00
Azeem Shaikh
59e14eef80
Add validation for checks.yaml (#781)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-07-29 20:29:12 +00:00