Skip to content

Commit 3e345fb

Browse files
committed
initial commit
0 parents  commit 3e345fb

Some content is hidden

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

44 files changed

+5163
-0
lines changed

.commitlintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.cspell-dict.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
abatilo
2+
bufio
3+
commitlint
4+
dorny
5+
dtolnay
6+
eamodio
7+
gomod
8+
gruntfuggly
9+
Hocevar
10+
liveshare
11+
markdownlint
12+
oderwat
13+
runtimes
14+
scrollback
15+
tamasfe
16+
vadimcn
17+
venv
18+
virtualenvs
19+
vuln

.cspell.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
3+
"version": "0.2",
4+
"dictionaryDefinitions": [
5+
{
6+
"name": "project-dict",
7+
"path": "./.cspell-dict.txt",
8+
"addWords": true
9+
}
10+
],
11+
"dictionaries": ["project-dict"],
12+
"ignorePaths": ["./.cspell-dict.txt"]
13+
}

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_style = space
9+
indent_size = 2
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://git-scm.com/docs/gitattributes
2+
3+
* text=auto

.github/dependabot.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: 2
2+
3+
updates:
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: github-actions
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
day: monday
10+
open-pull-requests-limit: 5
11+
12+
# Maintain dependencies for Go
13+
- package-ecosystem: gomod
14+
directory: /go
15+
schedule:
16+
interval: weekly
17+
day: monday
18+
open-pull-requests-limit: 5
19+
20+
# Maintain dependencies for Python
21+
- package-ecosystem: pip
22+
directory: /python
23+
schedule:
24+
interval: weekly
25+
day: monday
26+
open-pull-requests-limit: 5
27+
28+
# Maintain dependencies for Rust
29+
- package-ecosystem: cargo
30+
directory: /rust
31+
schedule:
32+
interval: weekly
33+
day: monday
34+
open-pull-requests-limit: 5
35+
36+
# Maintain dependencies for TypeScript
37+
- package-ecosystem: npm
38+
directory: /typescript
39+
schedule:
40+
interval: weekly
41+
day: monday
42+
open-pull-requests-limit: 5
43+
ignore:
44+
- dependency-name: '@types/node'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
name: Pull Request or Push to master
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches: [master]
7+
workflow_dispatch: {}
8+
9+
concurrency:
10+
group: ${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
permissions: {}
14+
15+
jobs:
16+
trunk_check:
17+
name: Trunk Check
18+
runs-on: ubuntu-latest
19+
permissions:
20+
checks: write # For Trunk to post annotations
21+
contents: read
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
25+
- name: Trunk Check
26+
uses: trunk-io/trunk-action@b61eb5749343e65e59ef104575a328b59f7285df # v1.1.4
27+
28+
detect_changes:
29+
name: Detect Changes
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
outputs:
34+
go: ${{ steps.filter.outputs.go }}
35+
python: ${{ steps.filter.outputs.python }}
36+
rust: ${{ steps.filter.outputs.rust }}
37+
typescript: ${{ steps.filter.outputs.typescript }}
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
41+
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
42+
id: filter
43+
with:
44+
filters: |
45+
go:
46+
- 'go/**'
47+
python:
48+
- 'python/**'
49+
rust:
50+
- 'rust/**'
51+
typescript:
52+
- 'typescript/**'
53+
54+
go_build_check:
55+
name: Go Build Check
56+
needs: detect_changes
57+
if: ${{ needs.detect_changes.outputs.go == 'true' }}
58+
runs-on: ubuntu-latest
59+
permissions:
60+
contents: read
61+
defaults:
62+
run:
63+
working-directory: go
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
67+
- name: Setup Go
68+
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
69+
with:
70+
go-version: 1.20.5
71+
- name: Run build check
72+
run: go build -o bin/ src/main.go
73+
- name: Run execution check
74+
run: go run src/main.go
75+
timeout-minutes: 1
76+
77+
python_build_check:
78+
name: Python Build Check
79+
needs: detect_changes
80+
if: ${{ needs.detect_changes.outputs.python == 'true' }}
81+
runs-on: ubuntu-latest
82+
permissions:
83+
contents: read
84+
defaults:
85+
run:
86+
working-directory: python
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
90+
- name: Setup Python
91+
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
92+
with:
93+
python-version: 3.11.4
94+
- name: Setup Poetry
95+
uses: abatilo/actions-poetry@192395c0d10c082a7c62294ab5d9a9de40e48974 # v2.3.0
96+
with:
97+
poetry-version: 1.5.1
98+
- name: Install package dependencies
99+
run: poetry install
100+
- name: Run build check
101+
run: poetry build
102+
- name: Run execution check
103+
run: poetry run python src/main.py
104+
timeout-minutes: 1
105+
106+
rust_build_check:
107+
name: Rust Build Check
108+
needs: detect_changes
109+
if: ${{ needs.detect_changes.outputs.rust == 'true' }}
110+
runs-on: ubuntu-latest
111+
permissions:
112+
contents: read
113+
defaults:
114+
run:
115+
working-directory: rust
116+
steps:
117+
- name: Checkout
118+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
119+
- name: Setup Rust
120+
uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e
121+
with:
122+
toolchain: 1.70.0
123+
- name: Run build check
124+
run: cargo build --locked --verbose
125+
- name: Run execution check
126+
run: cargo run
127+
timeout-minutes: 1
128+
129+
typescript_build_check:
130+
name: TypeScript Build Check
131+
needs: detect_changes
132+
if: ${{ needs.detect_changes.outputs.typescript == 'true' }}
133+
runs-on: ubuntu-latest
134+
permissions:
135+
contents: read
136+
defaults:
137+
run:
138+
working-directory: typescript
139+
steps:
140+
- name: Checkout
141+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
142+
- name: Setup NodeJS
143+
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
144+
with:
145+
node-version: 20.3.1
146+
- name: Install package dependencies
147+
run: npm ci
148+
- name: Run lint check
149+
run: npm run lint
150+
- name: Run build check
151+
run: npm run dist:build
152+
- name: Run execution check
153+
run: npm start
154+
timeout-minutes: 1

.gitignore

Whitespace-only changes.

.prettierrc.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 100,
3+
"proseWrap": "always",
4+
"singleQuote": true
5+
}

.tool-versions

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
golang 1.20.5
2+
python 3.11.4
3+
rust 1.70.0
4+
nodejs 20.3.1

.trunk/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*out
2+
*logs
3+
*actions
4+
*notifications
5+
plugins
6+
user_trunk.yaml
7+
user.yaml
8+
shims

.trunk/configs/.isort.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
profile=black

.trunk/configs/.markdownlint.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Autoformatter friendly markdownlint config (all formatting rules disabled)
2+
default: true
3+
blank_lines: false
4+
bullet: false
5+
html: false
6+
indentation: false
7+
line_length: false
8+
spaces: false
9+
url: false
10+
whitespace: false

.trunk/configs/.rustfmt.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
edition = "2021"

.trunk/configs/.yamllint.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Minimal yamllint config with no formatting rules enabled (prettier handles those)
2+
rules:
3+
quoted-strings:
4+
required: only-when-needed
5+
extra-allowed: ['{|}']
6+
empty-values:
7+
forbid-in-block-mappings: true
8+
forbid-in-flow-mappings: true
9+
key-duplicates: {}
10+
octal-values:
11+
forbid-implicit-octal: true

.trunk/configs/analyzers.yml

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright 2021 Praetorian Security, Inc.
2+
3+
# Licensed under the Apache License, Version 2.0 (the License);
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an AS IS BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# GoKart analyzers configuration
16+
17+
# Uncomment analyzers section below to create a new vulnerability type
18+
19+
# analyzers:
20+
# # Each entry specifies a vulnerability type.
21+
22+
# # Name of the vulnerability:
23+
# Test Sink:
24+
# # Description of this vulnerability
25+
# doc: Writing data to Printf()
26+
# # Message displayed when this vulnerability is found
27+
# message: Test Sink reachable by user input
28+
# # List of vulnerable functions used to identify this vulnerability
29+
# vuln_calls:
30+
# # Package name
31+
# log:
32+
# # Function name
33+
# - Printf
34+
35+
# Each entry specifies a source that should be considered untrusted
36+
# If the package already exists in the sources section, add the variable/function/type underneath
37+
# Each package can contain multiple vulnerable sources.
38+
sources:
39+
# Sources that are defined in Go documentation as a variable go here (note: these variables will have an SSA type of Global).
40+
variables:
41+
os:
42+
- Args
43+
# Sources that are defined in Go documentation as a function go here.
44+
functions:
45+
flag:
46+
- Arg
47+
- Args
48+
os:
49+
- Environ
50+
- File
51+
crypto/tls:
52+
- LoadX509KeyPair
53+
- X509KeyPair
54+
os/user:
55+
- Lookup
56+
- LookupId
57+
- Current
58+
crypto/x509:
59+
- Subjects
60+
io:
61+
- ReadAtLeast
62+
- ReadFull
63+
database/sql:
64+
- Query
65+
- QueryRow
66+
bytes:
67+
- String
68+
- ReadBytes
69+
- ReadByte
70+
bufio:
71+
- Text
72+
- Bytes
73+
- ReadString
74+
- ReadSlice
75+
- ReadRune
76+
- ReadLine
77+
- ReadBytes
78+
- ReadByte
79+
archive/tar:
80+
- Next
81+
- FileInfo
82+
- Header
83+
net/url:
84+
- ParseQuery
85+
- ParseUriRequest
86+
- Parse
87+
- Query
88+
# Sources that are defined in Go documentation as a type go here (note: adding types will consider all functions that use that type to be tainted).
89+
types:
90+
net/http:
91+
- Request

.trunk/configs/ruff.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Generic, formatter-friendly config.
2+
select = ["B", "D3", "D4", "E", "F"]
3+
4+
# Never enforce `E501` (line length violations). This should be handled by formatters.
5+
ignore = ["E501"]

0 commit comments

Comments
 (0)