-
Notifications
You must be signed in to change notification settings - Fork 3
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
CI checks for build, test, lint, and dep vulnerabilities #23
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
29d712b
CI checks for build, test, lint, and dep vulnerabilities
emostov a02b8ea
fmt
emostov e61ebd2
Try and simplify PR checks
emostov 60badb1
Only run on PR
emostov e4aa83b
Address clippy lint warnings
emostov acf10b4
fmt
emostov 576b3b8
newlines
emostov 5e9325e
Try adding cross target builds
emostov abefa7d
Try cross target again
emostov 42848f3
Try runs on target os
emostov a569409
Remove build
emostov 020d2e6
Try merge origin master
emostov b9d5c50
fmt
emostov d2c638d
Try merge origin master
emostov 698d39d
FMT
emostov 2628fdc
Remove security audit
emostov 6a113c6
Try merge origin master
emostov 666f7e1
Update the readme
emostov 1b2c80d
Don't use nightly for clippy
emostov c42d16b
Some changes to stream
emostov 035630c
Add missing_docs to some crates
emostov 39264b3
Add missing_docs to the remaining crates
emostov c986b00
Add clippy::pedantic to host
emostov 5d193e2
Finish pedantic lints for host
emostov 61258a9
Add clippy::pedantic to crypto
emostov 89d7730
Add clippy::pedantic to core
emostov 1540729
Add clippy::pedantic to client
emostov ac0f61c
fmt
emostov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Checks for PRs | ||
# See: https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml | ||
|
||
on: [pull_request] | ||
|
||
name: PR | ||
|
||
jobs: | ||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run cargo test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
|
||
rustfmt: | ||
name: rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-targets -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
Quick start | ||
# QuorumOS | ||
|
||
This is a WIP. | ||
|
||
## Submitting a PR | ||
|
||
Before a PR can be merged it must: | ||
|
||
Be formatted | ||
|
||
```bash | ||
cargo +nightly | ||
``` | ||
# make sure you have the latest rustc stable | ||
rustup update stable | ||
|
||
# run tests | ||
cargo test --all | ||
Pass the linter | ||
|
||
# format code | ||
cargo +nightly fmt | ||
```bash | ||
cargo clippy | ||
|
||
# to fix some types of lints you can run | ||
cargo clippy --fix | ||
``` | ||
|
||
# System requirements | ||
And pass all tests | ||
|
||
```bash | ||
cargo test | ||
``` | ||
|
||
## System requirements | ||
|
||
- openssl >= 1.1.0 | ||
|
||
# Key parts | ||
## Key parts | ||
|
||
## Enclave | ||
### Enclave | ||
|
||
- houses nitro server | ||
- see `qos-core` | ||
|
||
## Host | ||
|
||
- EC2 instance where the nitro enclave lives inside | ||
- has client for talking to nitro enclave | ||
- has server for incoming request from outside world | ||
- see `qos-host` | ||
|
||
## End user | ||
|
||
- Anything making request to host | ||
|
||
# Decisions / Things to Revisit: | ||
|
||
- Use Serde in `qos-core`. We've decided to do this right now for agility; but we should probably make our own simple macro or find a secure serialization lib (look into borsch?) | ||
|
||
# TODO: | ||
|
||
- Build crypto - all public key + hashing logic. High level so we can swap. Bring in OpenSSL | ||
- Pivot logic | ||
- Cli for posting shards, nsm attestation flow | ||
- Research flow for attestation - with nsm / nitro enclave docs | ||
|
||
- Sanity check vsock - aws or qemu | ||
- Run deployed aws attestation flow (save nsm responses for stubbing) | ||
- Smart shamir logic in enclave, don't randomly reconstruct | ||
- anything making request to host | ||
- see `qos-client` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense for "Checkout + fetch dependencies" to be a separate job, and have other jobs depend on that? I guess this way we can use
Cargo.lock
as the key for caching the toolchain and dependencies across CI runsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we could "Checkout + fetch dependencies" and then have subsequent jobs run in the same environment it makes sense because it saves us for having to do it for each. But AFAICT every job runs in its own environment so it won't save us any time but instead just make sure subsequent jobs don't run if it fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup every job runs in its own environment, however there's a ~global cache that every job can read/write. I think we can have the "checkout + fetch" job write to the cache, then let other jobs restore the cache: maybe something like this