-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathreport.h
114 lines (102 loc) · 2.92 KB
/
report.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
* Copyright (c) 2001-2002 Secure Software, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef REPORT_H
#define REPORT_H
#include "vuln_db.h"
#include "engine.h"
#ifndef _MSC_VER
#include <sys/time.h>
#endif
extern int total_lines;
#ifdef _MSC_VER
extern DWORD time_started;
extern DWORD time_finished;
#else
extern struct timeval time_started;
extern struct timeval time_finished;
#endif
typedef enum _type_t type_t;
enum _type_t
{
BOProblem,
FSProblem,
InputProblem,
Info,
RaceConditionCheck,
RaceConditionUse,
StaticLocalBuffer,
StaticGlobalBuffer,
Reference,
PythonBacktick,
PhpBacktick,
PerlBacktick,
RubyBacktick,
None
};
typedef struct _toctou_use_t toctou_use_t;
struct _toctou_use_t
{
char * name;
int lineno;
int column;
};
typedef struct _vulnerability_t vulnerability_t;
struct _vulnerability_t
{
char * filename;
int lineno;
int column;
Vuln_t * data;
type_t type;
Severity_t severity;
toctou_use_t * uses;
vulnerability_t * next;
vulnerability_t * prev;
};
typedef struct _input_t input_t;
struct _input_t
{
char * filename;
int lineno;
int column;
Vuln_t * data;
input_t * next;
};
typedef struct _ignore_t ignore_t;
struct _ignore_t
{
char * filename;
int lineno;
char * token; /* can be NULL */
ignore_t * next;
};
extern int warning_level;
extern void log_staticbuffer(type_t type, int, int, Severity_t);
extern void log_toctou(toctou_t **, int, int, int);
extern void log_pythonbacktick(int, int,Severity_t);
extern void log_perlbacktick(int, int,Severity_t);
extern void log_phpbacktick(int, int,Severity_t);
extern void log_rubybacktick(int, int,Severity_t);
extern void log_vulnerability(type_t, Severity_t);
extern void record_input(void);
extern void generate_report(void);
extern void generate_xml(void);
extern void generate_html(void);
extern ignore_t * new_ignore(int lineno, char *token);
#endif