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 all 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
1 change: 1 addition & 0 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- "main"
pull_request:

env:
REGISTRY: ghcr.io
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/pr.yaml

This file was deleted.

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
Binary file added allstar
Binary file not shown.
11 changes: 6 additions & 5 deletions cmd/allstar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"syscall"
"time"

"github.com/contentful/allstar/pkg/enforce"
"github.com/contentful/allstar/pkg/ghclients"
"github.com/contentful/allstar/pkg/policies"
"github.com/ossf/allstar/pkg/enforce"
"github.com/ossf/allstar/pkg/ghclients"
"github.com/ossf/allstar/pkg/policies"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down 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
2 changes: 1 addition & 1 deletion cmd/reviewbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"os"
"strconv"

"github.com/contentful/allstar/pkg/reviewbot"
"github.com/ossf/allstar/pkg/reviewbot"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
Expand Down
99 changes: 47 additions & 52 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/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/ossf/scorecard/v4 v4.13.2-0.20240326192505-153e06d99fed
github.com/rhysd/actionlint v1.7.1
github.com/rs/zerolog v1.33.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/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-containerregistry v0.19.1 // indirect
github.com/google/go-github/v53 v53.2.0 // indirect
github.com/google/go-github/v62 v62.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/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