Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit 65b4cbb

Browse files
authored
Trusty api calls (#1)
1 parent 8fce37d commit 65b4cbb

18 files changed

+82747
-8362
lines changed

.devcontainer/devcontainer.json

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
{
2-
"name": "echor",
3-
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bookworm",
4-
"features": {
5-
"ghcr.io/devcontainers-contrib/features/starship:1": {}
6-
},
7-
"customizations": {
8-
"vscode": {
9-
"settings": {
10-
"window.menuBarVisibility": "classic",
11-
"workbench.activityBar.location": "top",
12-
"debug.toolBarLocation": "docked",
13-
"editor.formatOnSave": true,
14-
"amazonQ.telemetry": false,
15-
"[markdown]": {
16-
"editor.defaultFormatter": "esbenp.prettier-vscode"
17-
}
18-
},
19-
"extensions": [
20-
"github.vscode-pull-request-github",
21-
"github.vscode-github-actions",
22-
"oderwat.indent-rainbow",
23-
"quicktype.quicktype",
24-
"ahebrank.yaml2json",
25-
"amazonwebservices.amazon-q-vscode",
26-
"Gruntfuggly.todo-tree",
27-
"esbenp.prettier-vscode"
28-
]
29-
}
30-
}
2+
"name": "trustier",
3+
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bookworm",
4+
"features": {
5+
"ghcr.io/devcontainers-contrib/features/starship:1": {},
6+
"ghcr.io/dasiths/devcontainer-features/syft:1": {}
7+
},
8+
"customizations": {
9+
"vscode": {
10+
"settings": {
11+
"window.menuBarVisibility": "classic",
12+
"workbench.activityBar.location": "top",
13+
"debug.toolBarLocation": "docked",
14+
"workbench.colorTheme": "Default Light Modern",
15+
"editor.useTabStops": true,
16+
"editor.formatOnSave": true,
17+
"editor.formatOnPaste": true,
18+
"git.autofetch": true,
19+
"[markdown]": {
20+
"editor.defaultFormatter": "esbenp.prettier-vscode"
21+
}
22+
},
23+
"extensions": [
24+
"GitHub.copilot",
25+
"github.vscode-pull-request-github",
26+
"github.vscode-github-actions",
27+
"oderwat.indent-rainbow",
28+
"quicktype.quicktype",
29+
"ahebrank.yaml2json",
30+
"Gruntfuggly.todo-tree",
31+
"esbenp.prettier-vscode",
32+
"BarbossHack.crates-io"
33+
]
34+
}
35+
}
3136
}

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- v[0-9]+.*
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
create-release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: taiki-e/create-gh-release-action@v1
20+
with:
21+
# (optional) Path to changelog.
22+
#changelog: CHANGELOG.md
23+
# (required) GitHub token for creating GitHub Releases.
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
upload-assets:
27+
needs: create-release
28+
strategy:
29+
matrix:
30+
include:
31+
- target: x86_64-unknown-linux-gnu
32+
os: ubuntu-latest
33+
- target: x86_64-apple-darwin
34+
os: macos-latest
35+
- target: x86_64-pc-windows-msvc
36+
os: windows-latest
37+
runs-on: ${{ matrix.os }}
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: taiki-e/upload-rust-binary-action@v1
41+
with:
42+
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
43+
# Note that glob pattern is not supported yet.
44+
bin: ...
45+
# (optional) Target triple, default is host triple.
46+
# This is optional but it is recommended that this always be set to
47+
# clarify which target you are building for if macOS is included in
48+
# the matrix because GitHub Actions changed the default architecture
49+
# of macos-latest since macos-14.
50+
target: ${{ matrix.target }}
51+
# (optional) On which platform to distribute the `.tar.gz` file.
52+
# [default value: unix]
53+
# [possible values: all, unix, windows, none]
54+
tar: unix
55+
# (optional) On which platform to distribute the `.zip` file.
56+
# [default value: windows]
57+
# [possible values: all, unix, windows, none]
58+
zip: windows
59+
# (required) GitHub token for uploading assets to GitHub Releases.
60+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# will have compiled files and executables
33
debug/
44
target/
5+
output/
56

67
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
78
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

.vscode/launch.json

Lines changed: 213 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,215 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"type": "lldb",
9-
"request": "launch",
10-
"name": "Debug executable 'trustier'",
11-
"cargo": {
12-
"args": [
13-
"build",
14-
"--bin=trustier",
15-
"--package=trustier"
16-
],
17-
"filter": {
18-
"name": "trustier",
19-
"kind": "bin"
20-
}
21-
},
22-
"args": ["./_TESTDATA_/railsgoat.cyclonedx.json"],
23-
"cwd": "${workspaceFolder}"
24-
},
25-
{
26-
"type": "lldb",
27-
"request": "launch",
28-
"name": "Debug unit tests in executable 'trustier'",
29-
"cargo": {
30-
"args": [
31-
"test",
32-
"--no-run",
33-
"--bin=trustier",
34-
"--package=trustier"
35-
],
36-
"filter": {
37-
"name": "trustier",
38-
"kind": "bin"
39-
}
40-
},
41-
"args": ["./_TESTDATA_/railsgoat.cyclonedx.json"],
42-
"cwd": "${workspaceFolder}"
43-
}
44-
]
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "lldb",
9+
"request": "launch",
10+
"name": "Debug executable 'trustier' (very small SBOM), output to file",
11+
"cargo": {
12+
"args": [
13+
"build",
14+
"--bin=trustier",
15+
"--package=trustier"
16+
],
17+
"filter": {
18+
"name": "trustier",
19+
"kind": "bin"
20+
}
21+
},
22+
"args": [
23+
"--output-file=output/trustier.json",
24+
"./tests/_TESTDATA_/small.cyclonedx.json"
25+
],
26+
"cwd": "${workspaceFolder}"
27+
},
28+
{
29+
"type": "lldb",
30+
"request": "launch",
31+
"name": "Debug unit tests in executable 'trustier' (very small SBOM)",
32+
"cargo": {
33+
"args": [
34+
"test",
35+
"--no-run",
36+
"--bin=trustier",
37+
"--package=trustier"
38+
],
39+
"filter": {
40+
"name": "trustier",
41+
"kind": "bin"
42+
}
43+
},
44+
"args": [
45+
"./tests/_TESTDATA_/small.cyclonedx.json"
46+
],
47+
"cwd": "${workspaceFolder}"
48+
},
49+
{
50+
"type": "lldb",
51+
"request": "launch",
52+
"name": "Debug executable 'trustier' (railsgoat)",
53+
"cargo": {
54+
"args": [
55+
"build",
56+
"--bin=trustier",
57+
"--package=trustier"
58+
],
59+
"filter": {
60+
"name": "trustier",
61+
"kind": "bin"
62+
}
63+
},
64+
"args": [
65+
"./tests/_TESTDATA_/railsgoat.cyclonedx.json"
66+
],
67+
"cwd": "${workspaceFolder}"
68+
},
69+
{
70+
"type": "lldb",
71+
"request": "launch",
72+
"name": "Debug unit tests in executable 'trustier' (railsgoat)",
73+
"cargo": {
74+
"args": [
75+
"test",
76+
"--no-run",
77+
"--bin=trustier",
78+
"--package=trustier"
79+
],
80+
"filter": {
81+
"name": "trustier",
82+
"kind": "bin"
83+
}
84+
},
85+
"args": [
86+
"./tests/_TESTDATA_/railsgoat.cyclonedx.json"
87+
],
88+
"cwd": "${workspaceFolder}"
89+
},
90+
{
91+
"type": "lldb",
92+
"request": "launch",
93+
"name": "Debug executable 'trustier' (juiceshop)",
94+
"cargo": {
95+
"args": [
96+
"build",
97+
"--bin=trustier",
98+
"--package=trustier"
99+
],
100+
"filter": {
101+
"name": "trustier",
102+
"kind": "bin"
103+
}
104+
},
105+
"args": [
106+
"./tests/_TESTDATA_/juiceshop.cyclonedx.json"
107+
],
108+
"cwd": "${workspaceFolder}"
109+
},
110+
{
111+
"type": "lldb",
112+
"request": "launch",
113+
"name": "Debug executable 'trustier' (juiceshop), output to file",
114+
"cargo": {
115+
"args": [
116+
"build",
117+
"--bin=trustier",
118+
"--package=trustier"
119+
],
120+
"filter": {
121+
"name": "trustier",
122+
"kind": "bin"
123+
}
124+
},
125+
"args": [
126+
"--output-file=output/trustier.json",
127+
"./tests/_TESTDATA_/juiceshop.cyclonedx.json"
128+
],
129+
"cwd": "${workspaceFolder}"
130+
},
131+
{
132+
"type": "lldb",
133+
"request": "launch",
134+
"name": "Debug unit tests in executable 'trustier' (juiceshop)",
135+
"cargo": {
136+
"args": [
137+
"test",
138+
"--no-run",
139+
"--bin=trustier",
140+
"--package=trustier"
141+
],
142+
"filter": {
143+
"name": "trustier",
144+
"kind": "bin"
145+
}
146+
},
147+
"args": [
148+
"./tests/_TESTDATA_/juiceshop.cyclonedx.json"
149+
],
150+
"cwd": "${workspaceFolder}"
151+
},
152+
{
153+
"type": "lldb",
154+
"request": "launch",
155+
"name": "Debug executable 'trustier' (trustier)",
156+
"cargo": {
157+
"args": [
158+
"build",
159+
"--bin=trustier",
160+
"--package=trustier"
161+
],
162+
"filter": {
163+
"name": "trustier",
164+
"kind": "bin"
165+
}
166+
},
167+
"args": [
168+
"./tests/_TESTDATA_/trustier.cyclonedx.json"
169+
],
170+
"cwd": "${workspaceFolder}"
171+
},
172+
{
173+
"type": "lldb",
174+
"request": "launch",
175+
"name": "Debug executable 'trustier' (trustier), output to file",
176+
"cargo": {
177+
"args": [
178+
"build",
179+
"--bin=trustier",
180+
"--package=trustier"
181+
],
182+
"filter": {
183+
"name": "trustier",
184+
"kind": "bin"
185+
}
186+
},
187+
"args": [
188+
"--output-file=output/trustier.json",
189+
"./tests/_TESTDATA_/trustier.cyclonedx.json"
190+
],
191+
"cwd": "${workspaceFolder}"
192+
},
193+
{
194+
"type": "lldb",
195+
"request": "launch",
196+
"name": "Debug unit tests in executable 'trustier' (trustier)",
197+
"cargo": {
198+
"args": [
199+
"test",
200+
"--no-run",
201+
"--bin=trustier",
202+
"--package=trustier"
203+
],
204+
"filter": {
205+
"name": "trustier",
206+
"kind": "bin"
207+
}
208+
},
209+
"args": [
210+
"./tests/_TESTDATA_/trustier.cyclonedx.json"
211+
],
212+
"cwd": "${workspaceFolder}"
213+
},
214+
]
45215
}

0 commit comments

Comments
 (0)