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 #522

Closed
wants to merge 98 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
f758788
Bump ossf/scorecard-action from 2.1.3 to 2.2.0
dependabot[bot] Sep 21, 2023
3dcbfcd
Bump sigstore/cosign-installer from 3.0.5 to 3.1.2
dependabot[bot] Sep 21, 2023
4f23879
Bump gocloud.dev from 0.29.0 to 0.34.0
dependabot[bot] Sep 21, 2023
8701b22
add codeowners and sast
roryscarson Sep 21, 2023
11607e8
add codeowners
roryscarson Sep 21, 2023
e10700d
add vault-secrets
roryscarson Sep 21, 2023
859e2fa
Merge pull request #11 from contentful/init
roryscarson Sep 21, 2023
6c157d8
Merge pull request #1 from contentful/dependabot/github_actions/ossf/…
roryscarson Sep 21, 2023
541dde2
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 21, 2023
3bbfa80
Merge pull request #10 from contentful/dependabot/go_modules/gocloud.…
roryscarson Sep 21, 2023
4bf923b
Merge pull request #2 from contentful/dependabot/github_actions/actio…
roryscarson Sep 21, 2023
d268fc7
Merge pull request #3 from contentful/dependabot/github_actions/sigst…
roryscarson Sep 21, 2023
f44c8c5
[]: Update CODEOWNERS
karankohli-cf Sep 21, 2023
5324e82
Update CODEOWNERS
karankohli-cf Sep 21, 2023
bbe3e1c
Update CODEOWNERS
karankohli-cf Sep 21, 2023
6b9d094
Merge pull request #12 from contentful/karankohli-cf-patch-1
karankohli-cf Sep 21, 2023
6a0d364
remove unneeded docs
roryscarson Sep 21, 2023
55fd894
Merge pull request #13 from contentful/cleanup
roryscarson Sep 21, 2023
69b1092
dockerfile
karankohli-cf Sep 22, 2023
0a82d2f
gha
karankohli-cf Sep 22, 2023
495e56d
Merge pull request #16 from contentful/docker
karankohli-cf Sep 22, 2023
5482a6f
Bump docker/metadata-action from 3.3.0 to 5.0.0
dependabot[bot] Sep 25, 2023
441c361
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 25, 2023
143c1a6
Bump docker/login-action from 1.10.0 to 3.0.0
dependabot[bot] Sep 25, 2023
303d55f
Bump docker/build-push-action from 2.5.0 to 5.0.0 (#17)
dependabot[bot] Sep 25, 2023
9de5e3d
[SEC-3230]Update Allstar Documentation
roryscarson Sep 25, 2023
7233d6a
Bump github.com/rs/zerolog from 1.29.1 to 1.31.0 (#22)
dependabot[bot] Sep 26, 2023
d738600
add opt out strategy
roryscarson Sep 26, 2023
9f45f82
Merge pull request #21 from contentful/sec-3230
roryscarson Sep 26, 2023
134d501
[SEC-3232]Add template and remove old deployment stuff
roryscarson Sep 26, 2023
58c85c3
add catalog check
karankohli-cf Sep 26, 2023
5c67f55
fix lint err
karankohli-cf Sep 26, 2023
26b7788
Merge pull request #24 from contentful/catalog
karankohli-cf Sep 26, 2023
e280c5c
fix: [] skip docker image job on dependabot and other branches
karankohli-cf Sep 26, 2023
5f6e0ce
Merge pull request #25 from contentful/skip-docker-image
karankohli-cf Sep 26, 2023
b8b6b81
Merge pull request #20 from contentful/dependabot/github_actions/dock…
karankohli-cf Sep 26, 2023
21814cc
Merge pull request #19 from contentful/dependabot/github_actions/acti…
karankohli-cf Sep 26, 2023
db61fed
Merge pull request #18 from contentful/dependabot/github_actions/dock…
karankohli-cf Sep 26, 2023
97c31f4
add group to owner for proper matching
roryscarson Sep 27, 2023
f520e99
change to bash variables
roryscarson Sep 27, 2023
653f7d6
[SEC-3227]Ignore archived repos in check
roryscarson Sep 27, 2023
8c0f378
more notes
roryscarson Sep 28, 2023
4bb3ab0
Merge pull request #23 from contentful/sec-3232
roryscarson Sep 28, 2023
28f0fa9
Merge branch 'main' into sec-3227
roryscarson Sep 29, 2023
eb774d1
update allstar to only pull unarchived repos
roryscarson Sep 29, 2023
e601e1a
remove archive check from catalog check
roryscarson Sep 29, 2023
691d639
add logging
roryscarson Oct 2, 2023
ae0549b
Bump golang.org/x/sync from 0.3.0 to 0.4.0 (#27)
dependabot[bot] Oct 6, 2023
705309f
Bump github.com/ossf/scorecard/v4 from 4.10.5 to 4.13.0 (#28)
dependabot[bot] Oct 9, 2023
66f9c3a
Bump ossf/scorecard-action from 2.2.0 to 2.3.0 (#29)
dependabot[bot] Oct 9, 2023
43bc978
remove log info
roryscarson Oct 10, 2023
0cb49d4
Merge branch 'main' into sec-3227
roryscarson Oct 10, 2023
2169fee
Revert "Bump github.com/ossf/scorecard/v4 from 4.10.5 to 4.13.0 (#28)"
roryscarson Oct 10, 2023
2822e04
Merge pull request #30 from contentful/revert-28-dependabot/go_module…
roryscarson Oct 10, 2023
23b625e
Merge branch 'main' into sec-3227
roryscarson Oct 10, 2023
36bf032
Merge pull request #26 from contentful/sec-3227
roryscarson Oct 10, 2023
acf62ce
[SEC-3237]Add catalog test
roryscarson Oct 10, 2023
ab83f28
closer
roryscarson Oct 11, 2023
547beda
add test
karankohli-cf Oct 20, 2023
fbe2abe
add notifytext to error message
roryscarson Oct 24, 2023
8e13381
fix tests finally
karankohli-cf Nov 2, 2023
5e8418b
fix tests finally
karankohli-cf Nov 2, 2023
42729cd
fix tests finally
karankohli-cf Nov 2, 2023
813cab1
Update catalog.go
karankohli-cf Nov 2, 2023
0dcea0d
Merge pull request #31 from contentful/sec-3237
hkhrais Nov 7, 2023
b1aad08
Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#50)
dependabot[bot] Jan 15, 2024
f69072c
Bump github/codeql-action from 2 to 3 (#52)
dependabot[bot] Jan 16, 2024
266a6f5
Bump actions/upload-artifact from 3 to 4 (#53)
dependabot[bot] Jan 16, 2024
8c2488b
Bump github.com/evanphx/json-patch (#54)
dependabot[bot] Jan 16, 2024
2d260e8
Bump github.com/evanphx/json-patch (#55)
dependabot[bot] Jan 17, 2024
41660ce
Bump actions/dependency-review-action from 3 to 4 (#56)
dependabot[bot] Jan 19, 2024
bfed946
chore: add docker in package-ecosystem
karankohli-cf Jan 25, 2024
207645f
Merge pull request #57 from contentful/chore/docker-dependabot
karankohli-cf Jan 25, 2024
567539b
Bump github.com/evanphx/json-patch (#59)
dependabot[bot] Jan 29, 2024
8feb635
Bump docker/metadata-action from 5.0.0 to 5.5.1 (#60)
dependabot[bot] Feb 1, 2024
a05002f
Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 (#61)
dependabot[bot] Feb 5, 2024
b3cdbd3
build(deps): bump golang from 1.20 to 1.21 (#58)
dependabot[bot] Feb 7, 2024
5ae0d60
build(deps): bump golangci/golangci-lint-action from 3 to 4 (#63)
dependabot[bot] Feb 12, 2024
58ff794
build(deps): bump github.com/rhysd/actionlint from 1.6.24 to 1.6.27 (…
dependabot[bot] Feb 26, 2024
619fc04
Create catalog-info.yaml
roryscarson Feb 29, 2024
4521f4a
Merge pull request #65 from contentful/catalog-info
roryscarson Feb 29, 2024
a7c7822
build(deps): bump docker/build-push-action from 5.0.0 to 5.2.0 (#66)
dependabot[bot] Mar 8, 2024
c8e37e4
build(deps): bump gocloud.dev from 0.34.0 to 0.37.0 (#67)
dependabot[bot] Mar 13, 2024
27af21a
build(deps): bump docker/login-action from 3.0.0 to 3.1.0 (#68)
dependabot[bot] Mar 14, 2024
c94fec5
build(deps): bump docker/build-push-action from 5.2.0 to 5.3.0 (#69)
dependabot[bot] Mar 15, 2024
633fb24
build(deps): bump github.com/bradleyfalzon/ghinstallation/v2 (#70)
dependabot[bot] Mar 22, 2024
336a854
build(deps): bump golang from 1.21 to 1.22 (#62)
dependabot[bot] Mar 28, 2024
520c18c
add to dockerfile
karankohli-cf Apr 4, 2024
9ef5c56
build(deps): bump golang.org/x/net from 0.22.0 to 0.23.0 (#78)
dependabot[bot] Apr 19, 2024
67cfe0e
build(deps): bump golangci/golangci-lint-action from 4 to 5 (#79)
dependabot[bot] Apr 25, 2024
56d34d8
build(deps): bump golangci/golangci-lint-action from 5 to 6 (#80)
dependabot[bot] May 7, 2024
37dc1b7
build(deps): bump github.com/rhysd/actionlint from 1.6.27 to 1.7.0 (#81)
dependabot[bot] May 9, 2024
3b06291
build(deps): bump ossf/scorecard-action from 2.3.0 to 2.3.3 (#82)
dependabot[bot] May 10, 2024
8ac2fb9
build(deps): bump github.com/rs/zerolog from 1.32.0 to 1.33.0 (#83)
dependabot[bot] May 23, 2024
349e7c7
build(deps): bump docker/login-action from 3.1.0 to 3.2.0 (#84)
dependabot[bot] May 28, 2024
c67e081
build(deps): bump github.com/rhysd/actionlint from 1.7.0 to 1.7.1 (#85)
dependabot[bot] May 29, 2024
5d69df9
build(deps): bump github.com/bradleyfalzon/ghinstallation/v2 (#86)
dependabot[bot] May 31, 2024
1df3800
Merge branch 'main' into syncs
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
5 changes: 5 additions & 0 deletions .contentful/vault-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
services:
github-action:
policies:
- dependabot
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* @contentful/team-security
go.mod
go.sum
.github/workflows
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: docker
directory: "/"
schedule:
interval: daily
time: "00:00"
timezone: UTC
open-pull-requests-limit: 15
commit-message:
prefix: build
include: scope
15 changes: 15 additions & 0 deletions .github/workflows/dependabot-approve-and-request-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "dependabot approve-and-request-merge"

on: pull_request_target

jobs:
worker:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: contentful/github-auto-merge@v1
with:
VAULT_URL: ${{ secrets.VAULT_URL }}
46 changes: 46 additions & 0 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Create and publish a Docker image

on:
release:
types: [published]
# publish on pushes to the main branch (image tagged as "latest")
push:
branches:
- "main"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
if: github.actor != 'dependabot[bot]' || github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/postmerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ossf/scorecard-action@v2.1.3
- uses: ossf/scorecard-action@v2.3.3
with:
results_file: results.sarif
results_format: sarif
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.20'
check-latest: true
- uses: golangci/golangci-lint-action@v4
- uses: golangci/golangci-lint-action@v6
with:
args: --timeout 3m --verbose
build:
Expand All @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.20'
check-latest: true
- run: go build -v ./...
test:
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.20'
check-latest: true
- run: go test -v ./...
- run: go vet ./...
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/release.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/sast.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: SAST (Static Application Security Testing)

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
polaris:
name: polaris / code-scan
continue-on-error: true
runs-on: ubuntu-latest
if: (github.repository_owner == 'contentful') && (endsWith(github.actor, '[bot]') == false)
steps:
- name: Clone repo
uses: actions/checkout@v4 # v4
with:
fetch-depth: 0

- name: Synopsys Polaris
uses: contentful/polaris-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
polaris_url: ${{ secrets.POLARIS_SERVER_URL }}
polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }}
debug: true
polaris_command: analyze -w --coverity-ignore-capture-failure
security_gate_filters: '{ "severity": ["High", "Medium"] }'
fail_on_error: false
report_url: "https://github.com/contentful/security-tools-config/issues/new?title=False%20positive%20in%20Polaris"
41 changes: 0 additions & 41 deletions CONTRIBUTING.md

This file was deleted.

23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use the official Go image as the base image
FROM golang:1.22 AS builder

# Set the working directory
WORKDIR /ko-app

# Copy the Go application source code
COPY . .

# Tidy em packages
RUN go mod tidy

# Build the Go application
RUN CGO_ENABLED=0 go build -o allstar ./cmd/allstar

# Use a minimal base image to reduce the image size
FROM gcr.io/distroless/base-debian10

# Copy the binary from the builder stage to the final image
COPY --from=builder /ko-app/allstar /ko-app/allstar

# Set the entry point for the final image
ENTRYPOINT ["/ko-app/allstar"]
Loading
Loading