21 const std::string &file_name,
30 message.
error() <<
"taint file is not a valid json file"
38 message.
error() <<
"expecting an array in the taint file, but got "
48 message.
error() <<
"expecting an array of objects "
56 const std::string kind =
taint_spec[
"kind"].value;
62 else if(kind==
"sanitizer")
77 const std::string function =
taint_spec[
"function"].value;
87 rule.function_identifier=function;
89 const std::string where =
taint_spec[
"where"].value;
91 if(where==
"return_value")
99 else if(std::string(where, 0, 9)==
"parameter")
102 rule.parameter_number =
135 case SOURCE: out <<
"SOURCE ";
break;
136 case SINK: out <<
"SINK ";
break;
137 case SANITIZER: out <<
"SANITIZER ";
break;
140 out <<
taint <<
" on ";
virtual void output(const namespacet &ns, const irep_idt &function_id, const goto_programt &goto_program, std::ostream &out) const
Output the abstract states for a single function.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Class that provides messages with a built-in verbosity 'level'.
static const commandt quote_begin
Start quoted text.
static const commandt quote_end
End quoted text.
enum taint_parse_treet::rulet::@2 where
void output(std::ostream &) const
irep_idt function_identifier
enum taint_parse_treet::rulet::@1 kind
unsigned parameter_number
void output(std::ostream &) const
const std::string & id2string(const irep_idt &d)
json_arrayt & to_json_array(jsont &json)
bool parse_json(std::istream &in, const std::string &filename, message_handlert &message_handler, jsont &dest)
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
unsigned safe_string2unsigned(std::string_view str, int base)
bool taint_parser(const std::string &file_name, taint_parse_treet &dest, message_handlert &message_handler)