trailofbits / differ

Detecting Inconsistencies in Feature or Function Evaluations of Requirements
GNU Affero General Public License v3.0
67 stars 4 forks source link

Bash Variables for Hooks #43

Closed ameily closed 1 year ago

ameily commented 1 year ago

When running setup, teardown, and concurrent (#13) hook scripts, there needs to be some bash variables for more advanced trace configuration. For example, when running a teardown script, it would be helpful if the PID of the concurrent script is available as a variable so that the teardown script can trigger a graceful exit if it is still running. For example:

# concurrent.sh
# Run the server
./start-server.sh

# teardown.sh
# trigger a graceful exit of the concurrent script
kill -USR1 $(DIFFER_CONCURRENT_SCRIPT_PID)

Bash variables are needed because we don't want to clobber any context fuzz variables and, by the time bash scripts are executed, the Jinaj2 templates have already been render so it'll be too late to update them.

Initial variables should include: