Git Product home page Git Product logo

pathbuf's Introduction

Hi, I'm Andrew! ๐Ÿ‘‹

Software Supply Chain Security

  • ๐Ÿ” Led the development of Hipcheck, a tool for automated supply chain risk assessment of software repositories.
  • ๐Ÿ–‡๏ธ Contribute to OmniBOR (formerly GitBOM), a standard and tooling for recording build inputs for software artifacts.
  • ๐Ÿ–จ๏ธ Build cargo-spdx, a tool for generating SPDX Software Bills of Materials for Rust builds.
  • ๐Ÿ”ง Work on software supply chain security at MITRE.

Rust

  • ๐Ÿฆ€ Write at Possible Rust (on hiatus).
  • ๐Ÿ—จ๏ธ Keep a list of languages written in Rust.
  • โ‰๏ธ Maintain woah, a Result type that separates errors you can handle from errors you can't.
  • ๐Ÿท๏ธ Maintain semver-explain, a CLI tool for explaining SemVer requirements.
  • ๐Ÿ›‘ Maintain replace_err, which adds a replace_err method for Result.
  • ๐Ÿ—๏ธ Maintain pathbuf, a convenient macro for building PathBufs.
  • ๐Ÿช„ Created FindCargo.cmake, a CMake module for interoperating with Cargo.

Less Serious Projects

  • โฒ๏ธ Wrote dcalc, a CLI duration calculator.
  • ๐Ÿฑ Wrote good-cat, a cat that hates pipes.
  • ๐Ÿ“Ž Wrote gccarch, a tool for getting info on GCC's supported architectures.
  • ๐Ÿ“† Wrote skej, a little analyzer for concurrent schedules.

Things I'd Like to Get To

  • ๐ŸŒ Creating Tin, a currently ill-defined programming language.
  • ๐Ÿ“Š Want to build epss, a library and CLI for interacting with the Exploit Prediction Scoring System API.
  • ๐Ÿ’ญ Want to finish building shy, a POSIX shell static site generator I can use on tilde.institute.

Past Projects

Lurking

pathbuf's People

Contributors

alilleybrinker avatar thealgorythm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thealgorythm

pathbuf's Issues

[enhancement] add note regarding path traversal attack

This isn't a particular problem of this crate, rather a missing push_one in the standard library, as push allows multiple components. But it would be good to document it also in this crate, so people don't forget about it.

If you want to add a path traversal protected version, have a look at a implementation by me.
Otherwise I will create a crate with this functionality (w\o macro), when I have time, but it could fit to this crate.

Consider implementation changes to protect from path traversal attacks.

Right now, as discussed in #1, the macro exposed by this crate leaves users vulnerable to path traversal attacks. However, it doesn't have to do so, and could either be modified, or have an alternative macro that protects against the attack, perhaps optionally with an unsafe version as well.

One version I could imagine would look like:

use pathbuf::try_pathbuf;

fn main() -> Result<(), Box<dyn Error>> {
    // This will fail, because "path/with" contains more than one component.
    let path = try_pathbuf!["some", "path/with", "a", "traversal", "issue.md"]?;

    Ok(())
}

This basically just rejects multi-part paths as inputs to the macro.

We could also imagine retaining the current pathbuf macro under a new name, like unsafe_pathbuf or insecure_pathbuf, which would include documentation that it should only be used with trusted (non-attacker-controlled) inputs, or else you'd be vulnerable to a path traversal attack.

The benefit some may see of the insecure macro is that you avoid the cost of single-component checking for each input.

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.