Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow fix #168

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/trust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Vulnerability scanning

# all the branches is fine. This shouldn't run on external PRs though
on:
pull_request:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install rust toolchain
run: rustup update stable
- name: install go toolchain
uses: actions/setup-go@v3
- name: install dependencies
run: |
cargo install cargo-cyclonedx
go install github.com/google/osv-scanner/cmd/osv-scanner@v1

- name: Build SBOM
run: cargo cyclonedx -f json --output-prefix bom
- name: Check SBOM against vulnerability database
id: scan
run: |
$HOME/go/bin/osv-scanner --sbom=bom.json > scan.txt
- name: Display CVEs analysis result as summary
if: failure()
run: |
echo "#OSV search result" >> $GITHUB_STEP_SUMMARY
cat scan.txt >> $GITHUB_STEP_SUMMARY
12 changes: 9 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tokio = { version = "1", features = ["full"] }

anyhow = "1.0"
thiserror = "1.0"
reqwest = { version = "0.11", features = ["blocking", "json"] }
reqwest = { version = "0.11.14", features = ["blocking", "json"] }
clap = { version = "3.2.22", features = ["cargo", "env"] }

oauth2 = "4.1.0"
Expand All @@ -41,7 +41,7 @@ qstring = "0.7.2"

url = { version = "2.2.1", features = ["serde"] }
urlencoding = "1.3"
chrono = { version = "0.4", features = ["serde"]}
chrono = { version = "0.5.0-alpha.1", features = ["serde"]}

webbrowser = "0.5.5"

Expand All @@ -52,7 +52,7 @@ tabular = "0.2"

base64 = "0.21.0"
rcgen = { version = "0.8.11", features = ["pem", "x509-parser"] }
x509-parser = "0.9.2"
x509-parser = "0.14.0"
json_value_merge = "0.1.2"

rsa = "0.5.0"
Expand All @@ -71,3 +71,9 @@ uuid = {version= "1.0", features = ["v4"]}
[patch.crates-io]
#drogue-client = { git = "https://github.com/drogue-iot/drogue-client", rev = "3e0fdb91305803c51946f8a818e4f053ab88c2c3" } # FIXME: awaiting release
#drogue-client = { path = "../drogue-client" }

#SBOM fixes
chrono = {git = "https://github.com/chronotope/chrono", branch = "main"}
native-tls = {git = "https://github.com/sfackler/rust-native-tls", branch = "master"}
oauth2 = {git = "https://github.com/ramosbugs/oauth2-rs", branch = "main"}
x509-parser = {git = "https://github.com/jbtrystram/x509-parser", branch = "patch-1"}