Coder Social home page Coder Social logo

audit-check's Introduction

RustSec Crates 🦀🛡️📦

The RustSec Advisory Database is a repository of security advisories filed against Rust crates published via crates.io.

The advisory database itself can be found at:

https://github.com/RustSec/advisory-db

About this repository

This repository contains a Cargo Workspace with all of the crates maintained by the RustSec project:

Name Description Crate Documentation Build
cargo‑audit Audit Cargo.lock against the advisory DB crates.io Documentation CI
cargo‑lock Self-contained Cargo.lock parser crates.io Documentation CI
cvss Common Vulnerability Scoring System crates.io Documentation CI
platforms Rust platform registry crates.io Documentation CI
rustsec Advisory DB client library crates.io Documentation CI
rustsec‑admin Linter and web site generator crates.io Documentation CI

License

All crates licensed under either of

at your option.

audit-check's People

Contributors

clechasseur avatar dependabot-preview[bot] avatar djmitche avatar pinkforest avatar ranger-ross avatar svartalf avatar tillmann-crabnebula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

audit-check's Issues

Display dependency tree

Often audit hits a dependency that is way below dependency tree and simple task such as including cargo tree graph in the issue could be beneficial as many don't understand the complexity of transient dependencies and what the downstream project can do who might be consumer several crates down.

Add a way to specify arguments

Could a way to pass arguments to the invocation be added? A way to enable flags like -Dunsound without a configuration file would be great.

Alternatively, maybe something like RUSTSECFLAGS=-Dyanked would be workable

Make `working-directory` configurable

I have a polyglot project with a backend in rust under ./backend and a frontend in elm. The project does not have a Cargo.toml or Cargo.lock in the project root. This causes the action to fail.

For other actions, I can overwrite the working-directory to fix this problem:

defaults:
  run:
    working-directory: backend

It would be nice to have an option for the audit action to run in a subdirectory.

One crate one issue

Currently if a crate has both unmaintained and unsound we raise two issues

It should be an issue per crate combined all the outstanding advisories

`generate-lockfile` overwrites a checked-in Cargo.lock

Copying actions-rs#163 to this fork.

Description

This action calls cargo generate-lockfile, which overwrites Cargo.lock according to cargo docs1

This command will create the Cargo.lock lockfile for the current package or workspace. If the lockfile already exists, it will be rebuilt with the latest available version of every package.

This negates the purpose of having a checked-in lockfile.

Proposed Fix

actions-rs#163 (comment)

Rather than call cargo generate-lockfile, call cargo metadata --format-version=1 >/dev/null instead.

Footnotes

  1. https://doc.rust-lang.org/cargo/commands/cargo-generate-lockfile.html

Version 1.4.1 still gives Node16 warning

I'm feeling dopey: I changed a project (https://github.com/richb-hanover/prql/blob/main/.github/workflows/nightly.yaml) to use rustsec/[email protected]. I did this to get away from the "Node16" warning from my previous action.

But I'm still getting this warning:

cargo-audit
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: rustsec/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

What am I missing? Thanks

PS @clechasseur - any thoughts on this? I see you made the PR to update to Node20... Thanks again.

Unexpected token  in JSON at position 0

I've noticed that occasionally, this action will fail but re-running seems to result in success:

Failure: 
https://github.com/microsoft/windows-drivers-rs/actions/runs/7647254535/job/20837787535?pr=78

Success:
https://github.com/microsoft/windows-drivers-rs/actions/runs/7647254535/job/20837822606?pr=78

Error:

Calling cargo-audit (JSON output)
  C:\Users\runneradmin\.cargo\bin\cargo.exe audit --json
  2024-01-24T22:51:25.296515Z  WARN hyper::client::connect::http: tcp set_nodelay error: An invalid argument was supplied. (os error 10022)
  2024-01-24T22:51:25.300736Z  WARN hyper::client::connect::http: tcp set_nodelay error: An invalid argument was supplied. (os error 10022)
  {"database":{"advisory-count":595,"last-commit":"1d2202ea2b32fabd3307641010301bfe1[8](https://github.com/microsoft/windows-drivers-rs/actions/runs/7647254535/job/20837787535?pr=78#step:3:9)7ef11a","last-updated":"2024-01-24T17:00:4[9](https://github.com/microsoft/windows-drivers-rs/actions/runs/7647254535/job/20837787535?pr=78#step:3:10)Z"},"lockfile":{"dependency-count":1[10](https://github.com/microsoft/windows-drivers-rs/actions/runs/7647254535/job/20837787535?pr=78#step:3:11)},"settings":{"target_arch":null,"target_os":null,"severity":null,"ignore":[],"informational_warnings":["unmaintained","unsound","notice"]},"vulnerabilities":{"found":false,"count":0,"list":[]},"warnings":{}}
Error: Unexpected token � in JSON at position 0

Rust GitHub Actions in actions-rs seem unmaintained

This is not a Rust crate, but tooling used by many Rust projects. Is this correct place to discuss and maybe take action on informing community about the issue?

The actions-rs GitHub Actions from GitHub (https://github.com/actions-rs) is used by many Rust projects.

However, the actions don't see much love, there's discussion about the maintenance status here: actions-rs/meta#43

As these actions are not maintained a known vulnerabilities might start to pile up and things might start to break because GitHub is deprecating support for some thing (e.g. actions-rs#227).

Pinging @svartalf since he's the (only?) owner of the GitHub organization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.