Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[]:Syncs from fork #88

Merged
merged 43 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2ec2dca
Update nocache condition
raghavkaul Nov 16, 2023
2531796
Skip empty repositories for enforcement
raghavkaul Nov 6, 2023
4b3f718
Fix tests
raghavkaul Nov 7, 2023
210e999
Use GitHub RepositoriesService.GetContent API
raghavkaul Nov 8, 2023
5bc0d49
update
raghavkaul Nov 9, 2023
1c18a33
Revert #471 empty check
jeffmendoza Nov 22, 2023
00e8917
Rename `boolArgPtr` to 'runOnce`
evankanderson Jun 24, 2023
968a887
Parameterize max goroutines
raghavkaul Nov 27, 2023
b9a43c0
Don't recreate scorecard clients multiple times
raghavkaul Nov 27, 2023
cd0a83b
Initialize scClients map once globally
raghavkaul Nov 27, 2023
c2c6202
Lock entire cleanup method
raghavkaul Nov 27, 2023
2767817
Update scorecard
raghavkaul Nov 22, 2023
3521ed8
Don't create issues for dangerous workflows when we have an inconclus…
coheigea Jan 8, 2024
83b10b5
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
92f6ce6
Bump sigstore/cosign-installer from 3.0.5 to 3.2.0
dependabot[bot] Nov 8, 2023
b48eddb
Update a lot of go deps.
jeffmendoza Feb 27, 2024
1192f07
Bump golangci/golangci-lint-action from 3 to 4
dependabot[bot] Feb 28, 2024
a4b662a
Bump github/codeql-action from 2 to 3
dependabot[bot] Feb 28, 2024
c4fc8c4
Bump actions/upload-artifact from 3 to 4
dependabot[bot] Feb 28, 2024
61a80e1
Bump actions/dependency-review-action from 3 to 4
dependabot[bot] Feb 29, 2024
26a969c
Bump sigstore/cosign-installer from 3.2.0 to 3.4.0
dependabot[bot] Feb 29, 2024
609be43
Catch unknown scorecard check.
jeffmendoza Mar 1, 2024
c532eed
Fix parsing of github action name.
jeffmendoza Mar 1, 2024
68e3449
Avoid panic with scorecard logs.
jeffmendoza Mar 1, 2024
24b20ac
Avoid panic when workflow dir contains other dirs.
jeffmendoza Mar 1, 2024
9c5f410
Change cache to avoid memory use
jeffmendoza Mar 6, 2024
964a34c
Switch to using a single worker
jeffmendoza Mar 7, 2024
c26edb2
Update issue in IssueRepo when change detected
twelsh-aw Mar 20, 2024
f42d035
Bump gocloud.dev from 0.36.0 to 0.37.0
dependabot[bot] Mar 13, 2024
3d71f35
Bump github.com/bradleyfalzon/ghinstallation/v2 from 2.9.0 to 2.10.0
dependabot[bot] Mar 22, 2024
5388811
Update scorecard and Go versions.
jeffmendoza Mar 27, 2024
27c8070
Update sc client mock
jeffmendoza May 3, 2024
80ddc24
Update go modules
jeffmendoza May 3, 2024
cc8cc68
Fix name of ko in cloudbuild
jeffmendoza May 3, 2024
3dc172e
docs: Adopt OpenSSF Scorecard contributor ladder
justaugustus May 28, 2024
0ae052c
docs: Allstar is now a part of the OpenSSF Scorecard project
justaugustus May 28, 2024
1df3800
Merge branch 'main' into syncs
karankohli-cf Jun 10, 2024
e2938c2
packages
karankohli-cf Jun 10, 2024
b53d179
package rename
karankohli-cf Jun 10, 2024
062a1de
go ver
karankohli-cf Jun 10, 2024
0549097
go ver
karankohli-cf Jun 10, 2024
72e1e6b
remove
karankohli-cf Jun 10, 2024
98c0d49
build on pr
karankohli-cf Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Maintainers

## `allstar-maintainers`

- @jeffmendoza

## Contributors

- @coheigea
- @danielbankhead
- @five510
- @justaugustus
- @markdboyd
- @naveensrinivasan
- @olivekl
- @yorinasub17

## Emeritus

Former maintainers are listed here.
Thanks for your contributions to Scorecard!

-
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ that affect the security of your projects. You can choose which security
policies to monitor at both the organization and repository level, and how to
handle policy violations. You can also develop or contribute new policies.

Allstar is developed under the [OpenSSF](https://openssf.org/) organization, as
a part of the [Securing Critical Projects Working
Group](https://github.com/ossf/wg-securing-critical-projects).
Allstar is developed as a part of the [OpenSSF Scorecard](https://github.com/ossf/scorecard) project.

## Getting Started

Expand Down
5 changes: 3 additions & 2 deletions cmd/allstar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func main() {
supportedPoliciesMsg += policyName
}
}
boolArgPtr := flag.Bool("once", false, "Run EnforceAll once, instead of in a continuous loop.")
var runOnce bool
flag.BoolVar(&runOnce, "once", false, "Run EnforceAll once, instead of in a continuous loop.")

specificPolicyArg := flag.String("policy", "", fmt.Sprintf("Run a specific policy check. Supported policies: %s", supportedPoliciesMsg))
specificRepoArg := flag.String("repo", "", "Run on a specific \"owner/repo\". For example \"ossf/allstar\"")
Expand All @@ -79,7 +80,7 @@ func main() {
Msg(fmt.Sprintf("Allstar will only run on repository %s", *specificRepoArg))
}

if *boolArgPtr {
if runOnce {
_, err := enforce.EnforceAll(ctx, ghc, *specificPolicyArg, *specificRepoArg)
if err != nil {
log.Fatal().
Expand Down
111 changes: 53 additions & 58 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
module github.com/contentful/allstar
module github.com/ossf/allstar

go 1.21

toolchain go1.21.4
go 1.21.8

require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/bradleyfalzon/ghinstallation/v2 v2.11.0
github.com/evanphx/json-patch v5.9.0+incompatible
github.com/bradleyfalzon/ghinstallation/v2 v2.10.0
github.com/evanphx/json-patch/v5 v5.9.0
github.com/gobwas/glob v0.2.3
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v50 v50.2.0
github.com/google/go-github/v59 v59.0.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/ossf/scorecard/v4 v4.10.5
github.com/rhysd/actionlint v1.7.1
github.com/rs/zerolog v1.33.0
github.com/ossf/scorecard/v4 v4.13.2-0.20240326192505-153e06d99fed
github.com/rhysd/actionlint v1.6.27
github.com/rs/zerolog v1.32.0
github.com/shurcooL/githubv4 v0.0.0-20210725200734-83ba7b4c9228
gocloud.dev v0.37.0
golang.org/x/sync v0.7.0
sigs.k8s.io/yaml v1.3.0
sigs.k8s.io/yaml v1.4.0
)

require (
Expand All @@ -28,11 +26,13 @@ require (
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/secretmanager v1.11.5 // indirect
cloud.google.com/go/storage v1.39.1 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/CycloneDX/cyclonedx-go v0.7.0 // indirect
dario.cat/mergo v1.0.0 // indirect
deps.dev/api/v3alpha v0.0.0-20240312000934-38ffc8dd1d92 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/CycloneDX/cyclonedx-go v0.8.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/anchore/go-struct-converter v0.0.0-20230627203149-c72ef8859ca9 // indirect
github.com/aws/aws-sdk-go v1.50.36 // indirect
github.com/aws/aws-sdk-go-v2 v1.25.3 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.7 // indirect
Expand All @@ -50,33 +50,32 @@ require (
github.com/aws/smithy-go v1.20.1 // indirect
github.com/bombsimon/logrusr/v2 v2.0.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v23.0.5+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v25.0.0+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/containerd/typeurl/v2 v2.1.1 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/dghubble/trie v0.1.0 // indirect
github.com/docker/cli v25.0.3+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v25.0.5+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/frankban/quicktest v1.14.5 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.4.1 // indirect
github.com/go-git/go-git/v5 v5.5.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-containerregistry v0.15.2 // indirect
github.com/google/go-github/v38 v38.1.0 // indirect
github.com/google/go-github/v62 v62.0.0 // indirect
github.com/google/go-containerregistry v0.19.1 // indirect
github.com/google/go-github/v53 v53.2.0 // indirect
github.com/google/go-github/v60 v60.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/osv-scanner v1.2.1-0.20230302232134-592acbc2539b // indirect
github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 // indirect
github.com/google/osv-scanner v1.7.1 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/google/wire v0.6.0 // indirect
Expand All @@ -85,57 +84,54 @@ require (
github.com/h2non/filetype v1.1.3 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jedib0t/go-pretty/v6 v6.4.4 // indirect
github.com/jedib0t/go-pretty/v6 v6.5.5 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/matryer/is v1.4.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/buildkit v0.11.4 // indirect
github.com/onsi/ginkgo/v2 v2.9.4 // indirect
github.com/onsi/gomega v1.27.6 // indirect
github.com/moby/buildkit v0.13.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170 // indirect
github.com/pjbgf/sha1cd v0.2.3 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/owenrumney/go-sarif/v2 v2.3.0 // indirect
github.com/package-url/packageurl-go v0.1.2 // indirect
github.com/pandatix/go-cvss v0.6.2 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skeema/knownhosts v1.1.0 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spdx/gordf v0.0.0-20221230105357-b735bd5aac89 // indirect
github.com/spdx/tools-golang v0.4.0 // indirect
github.com/spdx/tools-golang v0.5.3 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/xanzy/go-gitlab v0.83.0 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect
github.com/xanzy/go-gitlab v0.101.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/vuln v0.0.0-20230118164824-4ec8867cc0e6 // indirect
golang.org/x/tools v0.19.0 // indirect
golang.org/x/vuln v1.0.4 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/api v0.169.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
Expand All @@ -145,8 +141,7 @@ require (
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.1 // indirect
mvdan.cc/sh/v3 v3.6.0 // indirect
mvdan.cc/sh/v3 v3.8.0 // indirect
)
Loading
Loading