Skip to content

Commit

Permalink
Merge branch 'main' into annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlarsen authored Apr 11, 2024
2 parents 6a9e7ec + b5e0749 commit 19391fb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
features: release
install_dependencies: |
sudo apt-get install zsh libboost-all-dev
cpu_info_cmd: 'cat /proc/cpuinfo'

check_docs: false
run_tests: true
Expand All @@ -74,6 +75,7 @@ jobs:
features:
install_dependencies: |
sudo apt-get install zsh libboost-all-dev
cpu_info_cmd: 'cat /proc/cpuinfo'

check_docs: true
run_tests: true
Expand All @@ -85,6 +87,7 @@ jobs:
features:
install_dependencies: |
brew install coreutils boost
cpu_info_cmd: 'sysctl -a | grep machdep.cpu'

check_docs: false
run_tests: true
Expand All @@ -96,6 +99,7 @@ jobs:
features:
install_dependencies: |
brew install coreutils boost
cpu_info_cmd: 'sysctl -a | grep machdep.cpu'

check_docs: false
run_tests: true
Expand All @@ -112,6 +116,9 @@ jobs:
with:
toolchain: ${{ matrix.rust }}

- name: Print CPU info
run: ${{ matrix.cpu_info_cmd }}

- name: Cache
uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- The `vectorscan` and `vectorscan-sys` crates have been split off into a [separate project](https://github.com/bradlarsen/vectorscan-rs) with crates published on crates.io ([#168](https://github.com/praetorian-inc/noseyparker/pull/168)).

### Fixes

- Upon `noseyparker` startup, if resource limits cannot be adjusted, instead of crashing, a warning is printed and the process attempts to continue ([#170](https://github.com/praetorian-inc/noseyparker/issues/170)).


## [v0.17.0](https://github.com/praetorian-inc/noseyparker/releases/v0.17.0) (2024-03-05)

Expand Down
7 changes: 5 additions & 2 deletions crates/noseyparker-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use mimalloc::MiMalloc;
static GLOBAL: MiMalloc = MiMalloc;

use anyhow::{Context, Result};
use tracing::debug;
use tracing::{debug, warn};

mod args;
mod cmd_annotations;
Expand Down Expand Up @@ -95,7 +95,10 @@ fn try_main(args: &CommandLineArgs) -> Result<()> {
configure_backtraces(global_args);
configure_color(global_args);
configure_tracing(global_args).context("Failed to initialize logging")?;
configure_rlimits(global_args).context("Failed to initialize resource limits")?;

if let Err(e) = configure_rlimits(global_args) {
warn!("Failed to initialize resource limits: {e}");
}

match &args.command {
args::Command::Datastore(args) => cmd_datastore::run(global_args, args),
Expand Down
1 change: 1 addition & 0 deletions crates/noseyparker-cli/tests/test_noseyparker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ mod scan;
// TODO(test): add tests for enumerating GitHub Enterprise with the `--ignore-certs` optino
// TODO(test): add tests for `scan --git-url=URL --ignore-certs`
// TODO(test): add test case that validates `report -f json` output against the JSON schema (see the `jsonschema` crate)
// TODO(test) add test that failing to set rlimits at startup doesn't crash, but outputs a warning

0 comments on commit 19391fb

Please sign in to comment.