Skip to content

Commit 77bbfd3

Browse files
committed
AES vault provider and other repo setup
1 parent e78de55 commit 77bbfd3

27 files changed

+3233
-451
lines changed

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
day: friday
8+
time: "08:00"
9+
labels:
10+
- "dependencies"
11+
commit-message:
12+
prefix: "chore: "
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "monthly"
17+
day: friday
18+
time: "08:00"
19+
labels:
20+
- "dependencies"
21+
commit-message:
22+
prefix: "chore: "
23+
groups:
24+
experimental-golang-deps:
25+
patterns:
26+
- "golang.org/x/*"

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Summary
2+
3+
...enter summary here...
4+
5+
## Notable Changes
6+
7+
- ...enter notable changes here...
8+
- ...enter notable changes here...
9+
10+
## Change Type
11+
12+
- [ ] Bug fix (non-breaking change which fixes an issue)
13+
- [ ] New feature (non-breaking change which adds functionality)
14+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

.github/workflows/codeql.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
schedule:
10+
- cron: "00 5 * * SAT"
11+
12+
jobs:
13+
codeql:
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version: "^1.24.3"
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v3
31+
with:
32+
languages: go
33+
34+
- name: Autobuild
35+
uses: github/codeql-action/autobuild@v3
36+
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@v3

.github/workflows/validate.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Validate
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
validate:
11+
permissions:
12+
contents: read # for actions/checkout to fetch code
13+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Source
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: "^1.24.3"
23+
24+
- name: Init project
25+
run: |
26+
go mod tidy
27+
go generate ./...
28+
29+
# ____ _ _
30+
# / ___| ___ ___ _ _ _ __(_) |_ _ _
31+
# \___ \ / _ \/ __| | | | '__| | __| | | |
32+
# ___) | __/ (__| |_| | | | | |_| |_| |
33+
# |____/ \___|\___|\__,_|_| |_|\__|\__, |
34+
# |___/
35+
- name: Run Gosec Security Scanner
36+
uses: securego/gosec@master
37+
with:
38+
args: "-no-fail -fmt sarif -out results.sarif ./..."
39+
40+
- name: Upload SARIF file
41+
uses: github/codeql-action/upload-sarif@v3
42+
with:
43+
sarif_file: results.sarif
44+
45+
# _ _ _
46+
# | | (_)_ __ | |_
47+
# | | | | '_ \| __|
48+
# | |___| | | | | |_
49+
# |_____|_|_| |_|\__|
50+
#
51+
- name: golangci-lint
52+
uses: golangci/golangci-lint-action@v8
53+
with:
54+
version: v2.1.6
55+
56+
# _____ _
57+
# |_ _|__ ___| |_
58+
# | |/ _ \/ __| __|
59+
# | | __/\__ \ |_
60+
# |_|\___||___/\__|
61+
#
62+
- name: Run coverage
63+
# TODO: Add -race flag when the container becomes thread safe
64+
run: go test ./... -coverprofile=coverage.txt -covermode=atomic
65+
66+
- name: Upload coverage to Codecov
67+
uses: codecov/codecov-action@v5
68+
env:
69+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
70+
with:
71+
files: ./coverage.txt
72+
fail_ci_if_error: false

.golangci.yaml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
version: "2"
2+
linters:
3+
default: none
4+
enable:
5+
- asciicheck
6+
- bidichk
7+
- bodyclose
8+
- cyclop
9+
- decorder
10+
- dupl
11+
- durationcheck
12+
- errcheck
13+
- errname
14+
- errorlint
15+
- exhaustive
16+
- funlen
17+
- ginkgolinter
18+
- gocognit
19+
- goconst
20+
- gocritic
21+
- gocyclo
22+
- gomoddirectives
23+
- gomodguard
24+
- gosec
25+
- govet
26+
- ineffassign
27+
- lll
28+
- loggercheck
29+
- makezero
30+
- nakedret
31+
- nestif
32+
- nilerr
33+
- nilnil
34+
- noctx
35+
- nolintlint
36+
- nosprintfhostport
37+
- predeclared
38+
- reassign
39+
- staticcheck
40+
- tagalign
41+
- testableexamples
42+
- testpackage
43+
- tparallel
44+
- unconvert
45+
- unparam
46+
- unused
47+
- usestdlibvars
48+
- wastedassign
49+
- whitespace
50+
- zerologlint
51+
settings:
52+
cyclop:
53+
max-complexity: 30
54+
package-average: 10
55+
errcheck:
56+
check-type-assertions: true
57+
exhaustive:
58+
check:
59+
- switch
60+
- map
61+
funlen:
62+
lines: 100
63+
statements: 50
64+
ignore-comments: true
65+
gocognit:
66+
min-complexity: 20
67+
govet:
68+
disable:
69+
- fieldalignment
70+
enable-all: true
71+
settings:
72+
shadow:
73+
strict: true
74+
exclusions:
75+
generated: lax
76+
presets:
77+
- comments
78+
- common-false-positives
79+
- legacy
80+
- std-error-handling
81+
rules:
82+
- linters:
83+
- godot
84+
source: (noinspection|TODO)
85+
- linters:
86+
- gocritic
87+
source: //noinspection
88+
- linters:
89+
- lll
90+
path: mocks\.go
91+
- linters:
92+
- bodyclose
93+
- dupl
94+
- funlen
95+
- goconst
96+
- gosec
97+
- noctx
98+
- wrapcheck
99+
- exhaustive
100+
- gocognit
101+
- errcheck
102+
path: _test\.go
103+
- linters:
104+
- staticcheck
105+
text: SA5011
106+
- path: (.+)\.go$
107+
text: declaration of "(err|ctx)" shadows declaration at
108+
- path: (.+)\.go$
109+
text: G115
110+
paths:
111+
- third_party$
112+
- builtin$
113+
- examples$
114+
issues:
115+
max-same-issues: 50
116+
formatters:
117+
enable:
118+
- goimports
119+
exclusions:
120+
generated: lax
121+
paths:
122+
- third_party$
123+
- builtin$
124+
- examples$

0 commit comments

Comments
 (0)