trailofbits / differ

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

Input files #14

Closed ameily closed 1 year ago

ameily commented 1 year ago

This PR adds input file generation to the trace template allowing projects to copy or generate files used for input based on the generated variable values. This has been tested using the following project configuration.

name: coreutils_cat
original: /usr/bin/cat
debloaters:
  binrec: /usr/bin/cat

templates:
  - arguments: message.txt static.txt
    input_files:
      - source: message.template.txt
        destination: message.txt

      - source: static.txt
        static: true

    variables:
      value:
        type: int
        range:
          minimum: 0
          maximum: 100
          size: 10

    comparators:
      - stdout
      - stderr
      - exit_code

I'm using the following input files:

# message.template.txt
hello world!
the value is: {{value}}
goodbye!
# static.txt
This is static.txt

Closes #4