News for hackers. Stuff that matters.
Re:Shellfirm: Intercept risky patterns at the command line by NavinF on Sunday July 31, 2022 @03:49AM (#32294007)
Funny you say that when the sketchiest part of this submission is the shell script dependency it uses to intercept every command you run: https://github.com/rcaloras/bash-preexec/blob/master/bash-pr...

I don’t know rust, but the rust files in the submission look very straightforward. (Why wouldn’t it? It’s just matching a few hardcoded commands. It’d be easy in any language)

Re:Shellfirm: Intercept risky patterns at the command line by eladkaplan on Sunday July 31, 2022 @03:54AM (#32294038)
In base you need a hook that get the command before your shell execute the command. when the shell get the command interrupt this project execute shellfirm before summation in your shell
Re:Shellfirm: Intercept risky patterns at the command line by NavinF on Sunday July 31, 2022 @04:12AM (#32294125)
Yeah I get it. Your code is fine.

I just find it hilarious how that guy wanted you to implement this as a shell script so he could “audit it very easily”. I mean, bash-preexec.sh isn’t the worst shell script I’ve seen (It even has a Bats test!), but anyone that thinks shell scripts are easy to audit is full of shit.

Re:Shellfirm: Intercept risky patterns at the command line by eladkaplan on Sunday July 31, 2022 @04:15AM (#32294137)
In zshrc is much more easier based on the hooks that you get