Skip to content

Commit d2e790b

Browse files
committed
Merge branch 'main' into develop
# Conflicts: # go.mod # go.sum
2 parents 2f3f8ee + 75ad999 commit d2e790b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3658
-1808
lines changed

.dockerignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/dependabot.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "docker"
5+
directory: "/"
6+
labels: ["dependencies"]
7+
schedule:
8+
# By default, this will be on a Monday.
9+
interval: "weekly"
10+
groups:
11+
# Group all updates together, so that they are all applied in a single PR.
12+
# xref: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups
13+
docker:
14+
patterns:
15+
- "*"
16+
17+
- package-ecosystem: "github-actions"
18+
directory: "/"
19+
labels: ["area/CI", "dependencies"]
20+
schedule:
21+
# By default, this will be on a Monday.
22+
interval: "weekly"
23+
groups:
24+
# Group all updates together, so that they are all applied in a single PR.
25+
# xref: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups
26+
ci:
27+
patterns:
28+
- "*"
29+
30+
- package-ecosystem: "gomod"
31+
directory: "/"
32+
labels: ["dependencies"]
33+
schedule:
34+
# By default, this will be on a Monday.
35+
interval: "weekly"
36+
groups:
37+
# Group all updates together, so that they are all applied in a single PR.
38+
# xref: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups
39+
go:
40+
patterns:
41+
- "*"

.github/workflows/cli.yml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name: CLI
33
on:
44
push:
55
branches:
6-
- develop
7-
- master
6+
- main
87
pull_request:
98
branches:
10-
- develop
11-
- master
9+
- main
10+
11+
permissions:
12+
contents: read
1213

1314
jobs:
1415
build:
@@ -26,40 +27,52 @@ jobs:
2627
VAULT_TOKEN: "root"
2728
VAULT_ADDR: "http://127.0.0.1:8200"
2829
steps:
29-
- name: Install dependencies
30-
run: sudo apt-get update && sudo apt-get install git -y
3130
- name: Set up Go 1.20
32-
uses: actions/setup-go@v3
31+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
3332
with:
3433
go-version: '1.20'
3534
id: go
35+
3636
- name: Check out code into the Go module directory
37-
uses: actions/checkout@v3
38-
- uses: actions/cache@v3
37+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
38+
39+
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
3940
with:
4041
path: ~/go/pkg/mod
4142
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
4243
restore-keys: |
4344
${{ runner.os }}-go-
45+
46+
- name: Vendor Go Modules
47+
run: make vendor
48+
49+
- name: Ensure clean working tree
50+
run: git diff --exit-code
51+
4452
- name: Build Linux and Darwin
4553
if: matrix.os != 'windows'
4654
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }} -v ./cmd/sops
55+
4756
- name: Build Windows
4857
if: matrix.os == 'windows'
4958
run: GOOS=${{ matrix.os }} go build -o sops-${{ matrix.os }}-${{ github.sha }} -v ./cmd/sops
59+
5060
- name: Import test GPG keys
5161
run: for i in 1 2 3 4 5; do gpg --import pgp/sops_functional_tests_key.asc && break || sleep 15; done
62+
5263
- name: Test
5364
run: make test
65+
5466
- name: Upload artifact for Linux and Darwin
5567
if: matrix.os != 'windows'
56-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
5769
with:
5870
name: sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}
5971
path: sops-${{ matrix.os }}-${{ matrix.arch }}-${{ github.sha }}
72+
6073
- name: Upload artifact for Windows
6174
if: matrix.os == 'windows'
62-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
6376
with:
6477
name: sops-${{ matrix.os }}-${{ github.sha }}
6578
path: sops-${{ matrix.os }}-${{ github.sha }}
@@ -74,23 +87,32 @@ jobs:
7487
steps:
7588
- name: Install rustup
7689
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain 1.70.0
90+
7791
- name: Check out code
78-
uses: actions/checkout@v3
79-
- uses: actions/download-artifact@v3
92+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
93+
94+
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
8095
with:
8196
name: sops-linux-amd64-${{ github.sha }}
97+
8298
- name: Move SOPS binary
8399
run: mv sops-linux-amd64-${{ github.sha }} ./functional-tests/sops
100+
84101
- name: Make SOPS binary executable
85102
run: chmod +x ./functional-tests/sops
103+
86104
- name: Download Vault
87105
run: curl -O "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" && sudo unzip vault_${VAULT_VERSION}_linux_amd64.zip -d /usr/local/bin/
106+
88107
- name: Start Vault server
89108
run: vault server -dev -dev-root-token-id="$VAULT_TOKEN" &
109+
90110
- name: Enable Vault KV
91111
run: vault secrets enable -version=1 kv
112+
92113
- name: Import test GPG keys
93114
run: for i in 1 2 3 4 5; do gpg --import pgp/sops_functional_tests_key.asc && break || sleep 15; done
115+
94116
- name: Run tests
95117
run: cargo test
96118
working-directory: ./functional-tests

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
# Ignore changes to common non-code files.
9+
paths-ignore:
10+
- '**/*.md'
11+
- '**/*.rst'
12+
- '**/*.txt'
13+
- '**/*.yml'
14+
- '**/*.yaml'
15+
- '**/*.json'
16+
- '**/*.ini'
17+
- '**/*.env'
18+
schedule:
19+
- cron: '25 6 * * 3'
20+
21+
jobs:
22+
analyze:
23+
name: Analyze
24+
runs-on: ubuntu-latest
25+
permissions:
26+
actions: read
27+
contents: read
28+
security-events: write
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
33+
34+
# Initializes the CodeQL tools for scanning.
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
37+
with:
38+
languages: go
39+
# xref: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
40+
# xref: https://codeql.github.com/codeql-query-help/go/
41+
queries: security-and-quality
42+
43+
# Build the project, and run CodeQL analysis.
44+
# We do not make use of autobuild as this would run the first Make
45+
# target, which includes a lot more than just the Go files we want to
46+
# scan.
47+
- name: Build
48+
run: make install
49+
50+
- name: Perform CodeQL Analysis
51+
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
52+
with:
53+
category: "/language:go"

.github/workflows/docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Docs"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
# Only consider changes to documentation
9+
paths:
10+
- '**/*.md'
11+
- '**/*.rst'
12+
- '**/*.txt'
13+
schedule:
14+
- cron: '25 6 * * 3'
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
documentation:
21+
name: Lint RST and MD files
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
27+
28+
- name: Install rstcheck and markdownlint
29+
run: |
30+
pip install rstcheck
31+
sudo gem install mdl
32+
33+
- name: Run rstcheck on all RST files
34+
run: make checkrst
35+
36+
- name: Run mdl on all MD files
37+
run: make checkmd

0 commit comments

Comments
 (0)