Skip to content

Commit

Permalink
Import pre-commit and cargo deny config as well
Browse files Browse the repository at this point in the history
  • Loading branch information
nightkr committed Nov 29, 2024
1 parent 6a755b5 commit cc7fa42
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
default_language_version:
node: system

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key

- repo: https://github.com/doublify/pre-commit-rust
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
hooks:
- id: fmt
args: ["--all", "--", "--check"]
- id: clippy
args: ["--all-targets", "--", "-D", "warnings"]
- repo: https://github.com/adrienverge/yamllint
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
hooks:
- id: yamllint

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: f295829140d25717bc79368d3f966fc1f67a824f # 0.41.0
hooks:
- id: markdownlint

- repo: https://github.com/koalaman/shellcheck-precommit
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0
hooks:
- id: shellcheck
args: ["--severity=info"]

- repo: https://github.com/rhysd/actionlint
rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
hooks:
- id: actionlint

- repo: https://github.com/hadolint/hadolint
rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
hooks:
- id: hadolint
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Container Support Helper

This is a tool meant to make the life of a support engineer easier when working with docker containers.
This is a tool meant to make the life of a support engineer easier when working
with docker containers.

We often face issues where we would have loved to know more details about the environment a container is running in.
This tool is meant to print as much information as possible to stdout (later possibly also to a log file) to aid in debugging:
We often face issues where we would have loved to know more details about the
environment a container is running in. This tool is meant to print as much
information as possible to stdout (later possibly also to a log file)
to aid in debugging:

It currently prints:
- CPU core count
Expand All @@ -17,7 +20,6 @@ It currently prints:
- List of all network interfaces with names and IP addresses
- Reverse Lookup for those IP addresses (IP Address => List of hostnames)
- Forward lookup for those hostnames (Hostname => List of IP addresses)


Here is an example of what it looks like on my Laptop:

Expand Down
55 changes: 55 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[graph]
targets = [
{ triple = "x86_64-unknown-linux-gnu" },
{ triple = "aarch64-unknown-linux-gnu" },
{ triple = "x86_64-unknown-linux-musl" },
{ triple = "aarch64-apple-darwin" },
{ triple = "x86_64-apple-darwin" },
]

[advisories]
yanked = "deny"

[bans]
multiple-versions = "allow"

[licenses]
unused-allowed-license = "allow"
confidence-threshold = 1.0
allow = [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"CC0-1.0",
"ISC",
"LicenseRef-ring",
"LicenseRef-webpki",
"MIT",
"MPL-2.0",
"Unicode-3.0",
"Unicode-DFS-2016",
"Zlib",
"Unlicense",
]
private = { ignore = true }

[[licenses.clarify]]
name = "ring"
expression = "LicenseRef-ring"
license-files = [
{ path = "LICENSE", hash = 0xbd0eed23 },
]

[[licenses.clarify]]
name = "webpki"
expression = "LicenseRef-webpki"
license-files = [
{ path = "LICENSE", hash = 0x001c7e6c },
]

[sources]
unknown-registry = "deny"
unknown-git = "deny"

[sources.allow-org]
github = ["stackabletech"]

0 comments on commit cc7fa42

Please sign in to comment.