Skip to content

Commit fc82891

Browse files
committed
oss updates
1 parent 6f83916 commit fc82891

File tree

13 files changed

+668
-34
lines changed

13 files changed

+668
-34
lines changed

.github/workflows/main.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# based on https://github.com/mvdan/github-actions-golang
3+
name: CI
4+
5+
on:
6+
pull_request:
7+
branches: ["master"]
8+
paths-ignore: ["docs/**"]
9+
10+
push:
11+
branches: ["master"]
12+
paths-ignore: ["docs/**"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
jobs:
18+
test:
19+
strategy:
20+
matrix:
21+
go-version: [1.18.x]
22+
os: [ubuntu-latest]
23+
runs-on: ${{ matrix.os }}
24+
25+
steps:
26+
- name: Install Go
27+
uses: actions/setup-go@v3
28+
with:
29+
go-version: ${{ matrix.go-version }}
30+
31+
- name: Checkout code
32+
uses: actions/checkout@v3
33+
34+
# cache go modules
35+
- uses: actions/cache@v3
36+
with:
37+
# In order:
38+
# * Module download cache
39+
# * Build cache (Linux)
40+
# * Build cache (Mac)
41+
# * Build cache (Windows)
42+
path: |
43+
~/go/pkg/mod
44+
~/.cache/go-build
45+
~/Library/Caches/go-build
46+
%LocalAppData%\go-build
47+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
48+
restore-keys: |
49+
${{ runner.os }}-go-
50+
- name: Downloads the dependencies
51+
run: make download
52+
53+
- name: Lints all code with golangci-lint
54+
run: make lint
55+
56+
- name: Runs all tests
57+
run: make test

.github/workflows/semgrep.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Semgrep
2+
3+
on:
4+
# Scan changed files in PRs, block on new issues only (existing issues ignored)
5+
pull_request: {}
6+
7+
# Schedule this job to run at a certain time, using cron syntax
8+
# Note that * is a special character in YAML so you have to quote this string
9+
schedule:
10+
- cron: '30 0 1,15 * *' # scheduled for 00:30 UTC on both the 1st and 15th of the month
11+
12+
jobs:
13+
semgrep:
14+
name: Scan
15+
runs-on: ubuntu-latest
16+
# Skip any PR created by dependabot to avoid permission issues
17+
if: (github.actor != 'dependabot[bot]')
18+
steps:
19+
# Fetch project source
20+
- uses: actions/checkout@v3
21+
22+
- uses: returntocorp/semgrep-action@v1
23+
with:
24+
config: >- # more at semgrep.dev/explore
25+
p/security-audit
26+
p/secrets
27+
p/ci
28+
p/r2c
29+
p/r2c-ci
30+
p/docker
31+
p/dockerfile
32+
p/command-injection
33+
# == Optional settings in the `with:` block
34+
35+
# Instead of `config:`, use rules set in Semgrep App.
36+
# Get your token from semgrep.dev/manage/settings.
37+
# publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
38+
39+
# Never fail the build due to findings on pushes.
40+
# Instead, just collect findings for semgrep.dev/manage/findings
41+
# auditOn: push
42+
43+
# Upload findings to GitHub Advanced Security Dashboard [step 1/2]
44+
# See also the next step.
45+
# generateSarif: "1"
46+
47+
# Change job timeout (default is 1800 seconds; set to 0 to disable)
48+
# env:
49+
# SEMGREP_TIMEOUT: 300
50+
51+
# Upload findings to GitHub Advanced Security Dashboard [step 2/2]
52+
# - name: Upload SARIF file for GitHub Advanced Security Dashboard
53+
# uses: github/codeql-action/upload-sarif@v1
54+
# with:
55+
# sarif_file: semgrep.sarif
56+
# if: always()

.gitignore

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
###########
2+
# Project #
3+
###########
4+
5+
# make output
6+
bin/
7+
out/
8+
examples/examples
9+
10+
##########
11+
# Golang #
12+
##########
13+
14+
# Binaries for programs and plugins
15+
*.exe
16+
*.exe~
17+
*.dll
18+
*.so
19+
*.dylib
20+
21+
# Test binary, built with `go test -c`
22+
*.test
23+
24+
# Output of the go coverage tool, specifically when used with LiteIDE
25+
*.out
26+
27+
# Dependency directories (remove the comment below to include it)
28+
# vendor/
29+
30+
##########
31+
# Linux #
32+
##########
33+
34+
*~
35+
36+
# temporary files which can be created if a process still has a handle open of a deleted file
37+
.fuse_hidden*
38+
39+
# KDE directory preferences
40+
.directory
41+
42+
# Linux trash folder which might appear on any partition or disk
43+
.Trash-*
44+
45+
# .nfs files are created when an open file is removed but is still being accessed
46+
.nfs*
47+
48+
###########
49+
# Windows #
50+
###########
51+
52+
# Windows thumbnail cache files
53+
Thumbs.db
54+
Thumbs.db:encryptable
55+
ehthumbs.db
56+
ehthumbs_vista.db
57+
58+
# Dump file
59+
*.stackdump
60+
61+
# Folder config file
62+
[Dd]esktop.ini
63+
64+
# Recycle Bin used on file shares
65+
$RECYCLE.BIN/
66+
67+
# Windows Installer files
68+
*.cab
69+
*.msi
70+
*.msix
71+
*.msm
72+
*.msp
73+
74+
# Windows shortcuts
75+
*.lnk
76+
77+
#########
78+
# macOS #
79+
#########
80+
81+
# General
82+
.DS_Store
83+
.AppleDouble
84+
.LSOverride
85+
86+
# Icon must end with two \r
87+
Icon
88+
89+
# Thumbnails
90+
._*
91+
92+
# Files that might appear in the root of a volume
93+
.DocumentRevisions-V100
94+
.fseventsd
95+
.Spotlight-V100
96+
.TemporaryItems
97+
.Trashes
98+
.VolumeIcon.icns
99+
.com.apple.timemachine.donotpresent
100+
101+
# Directories potentially created on remote AFP share
102+
.AppleDB
103+
.AppleDesktop
104+
Network Trash Folder
105+
Temporary Items
106+
.apdisk
107+
108+
##########
109+
# VSCODE #
110+
##########
111+
112+
.vscode
113+
.vscode/*
114+
!.vscode/tasks.json
115+
!.vscode/launch.json
116+
!.vscode/extensions.json
117+
*.code-workspace
118+
119+
# Local History for Visual Studio Code
120+
.history/
121+
122+
#############
123+
# JetBrains #
124+
#############
125+
126+
.idea
127+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
128+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
129+
130+
# User-specific stuff
131+
.idea/**/workspace.xml
132+
.idea/**/tasks.xml
133+
.idea/**/usage.statistics.xml
134+
.idea/**/dictionaries
135+
.idea/**/shelf
136+
137+
# AWS User-specific
138+
.idea/**/aws.xml
139+
140+
# Generated files
141+
.idea/**/contentModel.xml
142+
143+
# Sensitive or high-churn files
144+
.idea/**/dataSources/
145+
.idea/**/dataSources.ids
146+
.idea/**/dataSources.local.xml
147+
.idea/**/sqlDataSources.xml
148+
.idea/**/dynamic.xml
149+
.idea/**/uiDesigner.xml
150+
.idea/**/dbnavigator.xml
151+
152+
# Mongo Explorer plugin
153+
.idea/**/mongoSettings.xml
154+
155+
# File-based project format
156+
*.iws
157+
158+
# mpeltonen/sbt-idea plugin
159+
.idea_modules/
160+
161+
# JIRA plugin
162+
atlassian-ide-plugin.xml
163+
164+
# Cursive Clojure plugin
165+
.idea/replstate.xml
166+
167+
# Crashlytics plugin (for Android Studio and IntelliJ)
168+
com_crashlytics_export_strings.xml
169+
crashlytics.properties
170+
crashlytics-build.properties
171+
fabric.properties
172+
173+
# Editor-based Rest Client
174+
.idea/httpRequests
175+
176+
# APPLICATION
177+
178+
*.db

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)