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

Remove atty and tracing-tree, update hermit-abi #2581

Merged
merged 5 commits into from
Jul 5, 2023

Conversation

karkhaz
Copy link
Contributor

@karkhaz karkhaz commented Jul 4, 2023

Description of changes:

This removes dependency on atty, and tracing-tree (which depends on atty). This is in response to this security advisory:

https://rustsec.org/advisories/RUSTSEC-2021-0145

atty is removed by switching to std::io::IsTerminal. tracing-tree is removed by replacing HierarchicalLayer with a regular tracing_subscriber::fmt::layer that directs to stderr.

The PR also updates hermit-abi to 0.3.2 from 0.3.1, in response to 0.3.1 being yanked.

Resolved issues:

Resolves #2580

Related RFC:

Optional #ISSUE-NUMBER.

Call-outs:

The removal of tracing-tree is intended to be temporary, until they remove their dependency on atty.

Testing:

  • How is this change tested?

I built it...

  • Is this a refactor change?

No

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

karkhaz added 4 commits July 4, 2023 22:03
This is in response to a security advisory stating that atty is
unmaintained and recommending to use std::io::IsTerminal.

https://rustsec.org/advisories/RUSTSEC-2021-0145

This fixes model-checking#2580.
This is because tracing-tree relies on atty, a package with an
outstanding security vulnerability.
This is because 0.3.1 is yanked.
@karkhaz karkhaz marked this pull request as ready for review July 4, 2023 23:23
@karkhaz karkhaz requested a review from a team as a code owner July 4, 2023 23:23
@karkhaz karkhaz enabled auto-merge (squash) July 5, 2023 00:24
@karkhaz karkhaz merged commit b35b4e6 into model-checking:main Jul 5, 2023
@karkhaz karkhaz deleted the kk-no-use-atty branch July 5, 2023 01:10
@karkhaz karkhaz mentioned this pull request Jul 12, 2023
4 tasks
celinval added a commit to celinval/kani-dev that referenced this pull request Aug 17, 2024
We reverted the hierarchical logs a while ago (model-checking#2581) due to an outdated
depedency that has since been fixed.

I think this makes the logs much more readable, by identing the logs
given the scope. More than one scope makes the lines way too long, which
I think it's harder to read.

This is how the logs look without this change:

```
2024-08-17T02:42:21.874979Z DEBUG CodegenFunction{name="kani::assert"}: kani_compiler::codegen_cprover_gotoc::utils::debug: handling kani::assert
2024-08-17T02:42:21.875008Z DEBUG CodegenFunction{name="kani::assert"}: kani_compiler::codegen_cprover_gotoc::utils::debug: variables:
2024-08-17T02:42:21.875026Z DEBUG CodegenFunction{name="kani::assert"}: kani_compiler::codegen_cprover_gotoc::utils::debug: let _0: Ty { id: 4, kind: RigidTy(Tuple([])) }

```

This is how it looks after this change:

```
┐kani_compiler::codegen_cprover_gotoc::codegen::function::CodegenFunction name="kani::assert"
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug handling kani::assert
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug variables:
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug let _0: Ty { id: 4, kind: RigidTy(Tuple([])) }
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug let _1: Ty { id: 6, kind: RigidTy(Bool) }

```
github-merge-queue bot pushed a commit that referenced this pull request Aug 22, 2024
We reverted the hierarchical logs a while ago (#2581) due to an outdated
dependency that has since been fixed.

I think this makes the logs much more readable, by indenting the logs
given the scope. More than one scope makes the lines way too long, which
I think it's harder to read.

This is how the logs look without this change:

```
2024-08-17T02:42:21.874979Z DEBUG CodegenFunction{name="kani::assert"}: kani_compiler::codegen_cprover_gotoc::utils::debug: handling kani::assert
2024-08-17T02:42:21.875008Z DEBUG CodegenFunction{name="kani::assert"}: kani_compiler::codegen_cprover_gotoc::utils::debug: variables:
2024-08-17T02:42:21.875026Z DEBUG CodegenFunction{name="kani::assert"}: kani_compiler::codegen_cprover_gotoc::utils::debug: let _0: Ty { id: 4, kind: RigidTy(Tuple([])) }

```

This is how it looks after this change:

```
┐kani_compiler::codegen_cprover_gotoc::codegen::function::CodegenFunction name="kani::assert"
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug handling kani::assert
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug variables:
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug let _0: Ty { id: 4, kind: RigidTy(Tuple([])) }
├─── DEBUG kani_compiler::codegen_cprover_gotoc::utils::debug let _1: Ty { id: 6, kind: RigidTy(Bool) }

```

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove atty dependency
2 participants