Skip to content

Commit

Permalink
Trusty api calls (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
djschleen authored Sep 17, 2024
1 parent 8fce37d commit 65b4cbb
Show file tree
Hide file tree
Showing 18 changed files with 82,747 additions and 8,362 deletions.
63 changes: 34 additions & 29 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
{
"name": "echor",
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bookworm",
"features": {
"ghcr.io/devcontainers-contrib/features/starship:1": {}
},
"customizations": {
"vscode": {
"settings": {
"window.menuBarVisibility": "classic",
"workbench.activityBar.location": "top",
"debug.toolBarLocation": "docked",
"editor.formatOnSave": true,
"amazonQ.telemetry": false,
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"extensions": [
"github.vscode-pull-request-github",
"github.vscode-github-actions",
"oderwat.indent-rainbow",
"quicktype.quicktype",
"ahebrank.yaml2json",
"amazonwebservices.amazon-q-vscode",
"Gruntfuggly.todo-tree",
"esbenp.prettier-vscode"
]
}
}
"name": "trustier",
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bookworm",
"features": {
"ghcr.io/devcontainers-contrib/features/starship:1": {},
"ghcr.io/dasiths/devcontainer-features/syft:1": {}
},
"customizations": {
"vscode": {
"settings": {
"window.menuBarVisibility": "classic",
"workbench.activityBar.location": "top",
"debug.toolBarLocation": "docked",
"workbench.colorTheme": "Default Light Modern",
"editor.useTabStops": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"git.autofetch": true,
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"extensions": [
"GitHub.copilot",
"github.vscode-pull-request-github",
"github.vscode-github-actions",
"oderwat.indent-rainbow",
"quicktype.quicktype",
"ahebrank.yaml2json",
"Gruntfuggly.todo-tree",
"esbenp.prettier-vscode",
"BarbossHack.crates-io"
]
}
}
}
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- v[0-9]+.*

env:
CARGO_TERM_COLOR: always

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (optional) Path to changelog.
#changelog: CHANGELOG.md
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
needs: create-release
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
# Note that glob pattern is not supported yet.
bin: ...
# (optional) Target triple, default is host triple.
# This is optional but it is recommended that this always be set to
# clarify which target you are building for if macOS is included in
# the matrix because GitHub Actions changed the default architecture
# of macos-latest since macos-14.
target: ${{ matrix.target }}
# (optional) On which platform to distribute the `.tar.gz` file.
# [default value: unix]
# [possible values: all, unix, windows, none]
tar: unix
# (optional) On which platform to distribute the `.zip` file.
# [default value: windows]
# [possible values: all, unix, windows, none]
zip: windows
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# will have compiled files and executables
debug/
target/
output/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand Down
256 changes: 213 additions & 43 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,215 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'trustier'",
"cargo": {
"args": [
"build",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": ["./_TESTDATA_/railsgoat.cyclonedx.json"],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'trustier'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": ["./_TESTDATA_/railsgoat.cyclonedx.json"],
"cwd": "${workspaceFolder}"
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'trustier' (very small SBOM), output to file",
"cargo": {
"args": [
"build",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"--output-file=output/trustier.json",
"./tests/_TESTDATA_/small.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'trustier' (very small SBOM)",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"./tests/_TESTDATA_/small.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'trustier' (railsgoat)",
"cargo": {
"args": [
"build",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"./tests/_TESTDATA_/railsgoat.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'trustier' (railsgoat)",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"./tests/_TESTDATA_/railsgoat.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'trustier' (juiceshop)",
"cargo": {
"args": [
"build",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"./tests/_TESTDATA_/juiceshop.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'trustier' (juiceshop), output to file",
"cargo": {
"args": [
"build",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"--output-file=output/trustier.json",
"./tests/_TESTDATA_/juiceshop.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'trustier' (juiceshop)",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"./tests/_TESTDATA_/juiceshop.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'trustier' (trustier)",
"cargo": {
"args": [
"build",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"./tests/_TESTDATA_/trustier.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'trustier' (trustier), output to file",
"cargo": {
"args": [
"build",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"--output-file=output/trustier.json",
"./tests/_TESTDATA_/trustier.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'trustier' (trustier)",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=trustier",
"--package=trustier"
],
"filter": {
"name": "trustier",
"kind": "bin"
}
},
"args": [
"./tests/_TESTDATA_/trustier.cyclonedx.json"
],
"cwd": "${workspaceFolder}"
},
]
}
Loading

0 comments on commit 65b4cbb

Please sign in to comment.