Open compaluca opened 2 years ago
Review at least 15 each.
Review at least 15 each.
@SoheilKhodayari, @ManuManu97 for discovery rules do not hesitate to ping @pr0me
We do not have reliable SAST measurement results, so for the moment we can proceed in the pattern alphabetical name order.
Goal
Review, mature, extend our SAST testability patterns
Links
Checklist
Please follow the process hereafter for each pattern that you review.
Phase 1: main json file complete?
README.md
) availablecode_pattern_php
["sast", "php", "php_v7.4.9"]
Phase 2: pattern instances
For each instance in the pattern
2.1: instance is measurable?
"code"
part (instance json) seems fine"expectation"
part (instance json) seems fine"compile"
should be properly filled and"dependencies"
(if any) should be provided. The framework uses standard compilation instructions. If something specific is required, this can be specified in the"instruction"
2.2: instance is discoverable?
"discovery"
part (instance json) seems fine"rule_accuracy"
is correctly estimated"notes"
is there any note I can add?tpframework manual-discovery -h
)2.3: instance properties
all the following were done for our papers and they may be obsolete or not fitting your patterns. We can add a new field "tags" in the instance to specify whatever we need
"category"
: how dynamic this instance is?"S0"
: not dynamic at all"D1"
: dynamic functions are used but with constant values as params that make the dynamicity solvable at static time (e.g.,call_user_func("foo",$x)
"D2"
: dynamic functions are used with some variables that can be however resolved at static time by simple constant propagation. E.g.,"D3"
: dynamic functions are used with some operators and variables that can be however partially resolved at static time by simple constant propagation. E.g.,"D4"
: dynamic functions are used with variables and/or operators that cannot be resolved at static time"feature_vs_internal_api"
: is this capturing an internal API or not?"input_sanitizer"
: is the instance capturing an input sanitizer that may be not supported by SAST tools?"source_and_sink"
: is the instance capturing an source/sink that may be not supported by SAST tools?"negative_test_case"
: this is the not of "expectation"->"expectation" to test how big the over-approximation of a SAST tool could be wrt this instance2.4: instance is remediable? (optional)
Phase 3: test with the framework
tpframework measure -h
tpframework discovery -h
Phase 4: retrofit your review in the shared excel file