-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c150f4
commit 9e5c83b
Showing
9 changed files
with
61 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
use rustc_macros::SessionDiagnostic; | ||
use rustc_macros::Diagnostic; | ||
use rustc_span::Span; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[error = "T0001"] | ||
#[derive(Diagnostic)] | ||
#[diag(taint_func_received_tainted_input, code="T0001")] | ||
pub(crate) struct TaintedSink { | ||
pub fn_name: String, | ||
#[message = "function `{fn_name}` received tainted input"] | ||
#[label = "sink function"] | ||
#[label(taint_sink_function)] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[error = "T0002"] | ||
#[derive(Diagnostic)] | ||
#[diag(taint_attribute_is_invalid, code="T0002")] | ||
pub(crate) struct InvalidVariant { | ||
pub attr_name: String, | ||
#[message = "Taint attribute `{attr_name}` is invalid. We currently only support `source`, `sink`, and `sanitizer`"] | ||
#[label = "invalid taint attribute"] | ||
#[label(taint_invalid_taint_attribute)] | ||
pub span: Span, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
taint_attribute_is_invalid = Taint attribute `{$attr_name}` is invalid. We currently only support 'source', 'sink', and 'sanitizer' | ||
taint_func_received_tainted_input = function `{$fn_name}` received tainted input | ||
taint_invalid_taint_attribute = invalid taint attribute | ||
taint_sink_function = sink function |