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

ci: add cargo-deny check #245

Merged
merged 1 commit into from
May 6, 2024
Merged
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
45 changes: 0 additions & 45 deletions .cargo/audit.toml

This file was deleted.

9 changes: 1 addition & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-audit-v0.15.2
- uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: EmbarkStudios/cargo-deny-action@v1

cargo-lint:
uses: ./.github/workflows/clippy.yml
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/main_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-audit-v0.15.2
- uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: EmbarkStudios/cargo-deny-action@v1

cargo-lint:
uses: ./.github/workflows/clippy.yml
Expand Down
38 changes: 10 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
exclude: crate/cli/test_data|documentation/pandoc|documentation/overrides|enclave|crate/server/src/tests/test_utils.rs|crate/cli/src/tests/utils/test_utils.rs|crate/client/src/lib.rs|crate/cli/src/tests/certificates/openssl.rs|crate/client/src/kms_rest_client.rs|.pre-commit-config.yaml|crate/server/src/routes/google_cse/jwt.rs|crate/server/src/routes/google_cse/python/openssl|documentation/docs/google_cse
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [] # optional: list of Conventional Commits types to allow e.g. [feat, fix, ci, chore, test]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v4.0.0-alpha.8
hooks:
- id: prettier
stages: [commit]
Expand All @@ -27,7 +27,7 @@ repos:
exclude: documentation/theme_overrides/assets

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
rev: v0.40.0
hooks:
- id: markdownlint-fix
args:
Expand All @@ -50,27 +50,27 @@ repos:
- id: markdown-toc

- repo: https://github.com/tcort/markdown-link-check
rev: v3.11.2
rev: v3.12.1
hooks:
- id: markdown-link-check
args: [-q]
exclude: documentation/docs/ms_dke/ms_dke.md

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.2
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, "2", --sequence, "4", --offset, "2"]
exclude: ansible

- repo: https://github.com/crate-ci/typos
rev: v1.13.1
rev: v1.21.0
hooks:
- id: typos
exclude: documentation/docs/images/google_cse.drawio.svg|crate/test_server/src/test_jwt.rs|crate/pkcs11/documentation/veracrypt_ckms.svg|crate/client/test_data/configs/kms.bad|crate/test_server/certificates/|crate/client/test_data/configs/|crate/server/src/tests/google_cse/|crate/pkcs11/sys/src/

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
Expand All @@ -80,7 +80,7 @@ repos:
exclude: ^.git/

- repo: https://github.com/sirosen/texthooks
rev: 0.4.0
rev: 0.6.6
hooks:
- id: fix-smartquotes
- id: fix-ligatures
Expand All @@ -94,7 +94,7 @@ repos:
- id: shellcheck

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down Expand Up @@ -128,30 +128,12 @@ repos:
exclude: crate/kmip/src/kmip/extra/x509_extensions.rs

- repo: https://github.com/psf/black
rev: 22.10.0
rev: 24.4.2
hooks:
- id: black
# avoid clash with `double-quote-string-fixer`
args: [--skip-string-normalization]

- repo: https://github.com/Cube707/mkdocs
rev: e8733d1373c1543d6052925d3272b2ff51dbb140
hooks:
- id: mkdocs-build
additional_dependencies:
- mkdocs-plugin-progress
- mkdocs-kroki-plugin
- mkdocs-material
- mkdocs-meta-descriptions-plugin
- markdown-katex
entry: bash -c 'cd documentation && mkdocs build --strict'

- repo: https://github.com/cisagov/pre-commit-packer
rev: v0.0.2
hooks:
- id: packer_fmt
- id: packer_validate

- repo: https://github.com/Cosmian/git-hooks.git
rev: v1.0.25
hooks:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ authors = [
"Emmanuel Coste <emmanuel.coste@cosmian.com>",
"Hugo Rosenkranz-Costa <hugo.rosenkranz@cosmian.com>"
]
license = "Business Source License 1.1"
license = "BUSL-1.1" # "Business Source License 1.1"
license-file = "LICENSE"
repository = "https://github.com/Cosmian/kms"

[profile.release]
Expand Down
1 change: 0 additions & 1 deletion crate/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
license-file = "../../LICENSE"
description = "CLI used to manage the Cosmian KMS."

[[bin]]
Expand Down
1 change: 0 additions & 1 deletion crate/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
license-file = "../../LICENSE"

[lib]
# doc test linking as a separate binary is extremely slow
Expand Down
1 change: 0 additions & 1 deletion crate/kmip/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
license-file = "../../LICENSE"

[lib]
# doc test linking as a separate binary is extremely slow
Expand Down
1 change: 0 additions & 1 deletion crate/logger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
license-file = "../../LICENSE"

[dependencies]
tracing = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion crate/pyo3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
license-file = "../../LICENSE"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion crate/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
license-file = "../../LICENSE"
description = "Cosmian Key Management Service"

[[bin]]
Expand Down
1 change: 0 additions & 1 deletion crate/test_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
license-file = "../../LICENSE"

[lib]
# doc test linking as a separate binary is extremely slow
Expand Down
Loading
Loading