Skip to content

Commit f82fb06

Browse files
authored
[analyzer] Moving TaintPropagation checker out of alpha (#67352)
This commit moves the **alpha.security.taint.TaintPropagation** and **alpha.security.taint.GenericTaint** checkers to the **optin.taint** optional package. These checkers were stabilized and improved by recent commits thus they are ready for production use.
1 parent 28439a1 commit f82fb06

31 files changed

+305
-312
lines changed

clang/docs/analyzer/checkers.rst

Lines changed: 237 additions & 235 deletions
Large diffs are not rendered by default.

clang/docs/analyzer/user-docs/TaintAnalysisConfiguration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Taint Analysis Configuration
44

55
The Clang Static Analyzer uses taint analysis to detect injection vulnerability related issues in code.
66
The backbone of taint analysis in the Clang SA is the ``TaintPropagation`` modeling checker.
7-
The reports are emitted via the :ref:`alpha-security-taint-GenericTaint` checker.
7+
The reports are emitted via the :ref:`optin-taint-GenericTaint` checker.
88
The ``TaintPropagation`` checker has a default taint-related configuration.
99
The built-in default settings are defined in code, and they are always in effect.
10-
The checker also provides a configuration interface for extending the default settings via the ``alpha.security.taint.TaintPropagation:Config`` checker config parameter
10+
The checker also provides a configuration interface for extending the default settings via the ``optin.taint.TaintPropagation:Config`` checker config parameter
1111
by providing a configuration file to the in `YAML <http://llvm.org/docs/YamlIO.html#introduction-to-yaml>`_ format.
1212
This documentation describes the syntax of the configuration file and gives the informal semantics of the configuration options.
1313

clang/include/clang/StaticAnalyzer/Checkers/Checkers.td

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def Performance : Package<"performance">, ParentPackage<OptIn>;
7474
def Security : Package <"security">;
7575
def InsecureAPI : Package<"insecureAPI">, ParentPackage<Security>;
7676
def SecurityAlpha : Package<"security">, ParentPackage<Alpha>;
77-
def Taint : Package<"taint">, ParentPackage<SecurityAlpha>;
7877

7978
def CERT : Package<"cert">, ParentPackage<Security>;
8079
def ENV : Package<"env">, ParentPackage<CERT>;
@@ -1049,30 +1048,6 @@ def ReturnPointerRangeChecker : Checker<"ReturnPtrRange">,
10491048

10501049
} // end "alpha.security"
10511050

1052-
//===----------------------------------------------------------------------===//
1053-
// Taint checkers.
1054-
//===----------------------------------------------------------------------===//
1055-
1056-
let ParentPackage = Taint in {
1057-
1058-
def TaintPropagationChecker : Checker<"TaintPropagation">, // Modelling checker
1059-
HelpText<"Generate taint information used by other checkers">,
1060-
CheckerOptions<[
1061-
CmdLineOption<String,
1062-
"Config",
1063-
"Specifies the name of the configuration file.",
1064-
"",
1065-
InAlpha>,
1066-
]>,
1067-
Documentation<NotDocumented>,
1068-
Hidden;
1069-
1070-
def GenericTaintChecker : Checker<"GenericTaint">,
1071-
HelpText<"Reports potential injection vulnerabilities">,
1072-
Dependencies<[TaintPropagationChecker]>,
1073-
Documentation<HasDocumentation>;
1074-
1075-
} // end "alpha.security.taint"
10761051

10771052
//===----------------------------------------------------------------------===//
10781053
// Mac OS X, Cocoa, and Core Foundation checkers.
@@ -1704,6 +1679,24 @@ def UnixAPIPortabilityChecker : Checker<"UnixAPI">,
17041679

17051680
let ParentPackage = TaintOptIn in {
17061681

1682+
def TaintPropagationChecker : Checker<"TaintPropagation">, // Modelling checker
1683+
HelpText<"Generate taint information used by other checkers">,
1684+
CheckerOptions<[
1685+
CmdLineOption<String,
1686+
"Config",
1687+
"Specifies the name of the configuration file.",
1688+
"",
1689+
Released>
1690+
]>,
1691+
Documentation<NotDocumented>,
1692+
Hidden;
1693+
1694+
def GenericTaintChecker : Checker<"GenericTaint">,
1695+
HelpText<"Reports potential injection vulnerabilities">,
1696+
Dependencies<[TaintPropagationChecker]>,
1697+
Documentation<HasDocumentation>;
1698+
1699+
17071700
def TaintedAllocChecker: Checker<"TaintedAlloc">,
17081701
HelpText<"Check for memory allocations, where the size parameter "
17091702
"might be a tainted (attacker controlled) value.">,

clang/test/Analysis/analyzer-config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// CHECK-NEXT: alpha.clone.CloneChecker:ReportNormalClones = true
1010
// CHECK-NEXT: alpha.cplusplus.STLAlgorithmModeling:AggressiveStdFindModeling = false
1111
// CHECK-NEXT: alpha.osx.cocoa.DirectIvarAssignment:AnnotatedFunctions = false
12-
// CHECK-NEXT: alpha.security.taint.TaintPropagation:Config = ""
1312
// CHECK-NEXT: apply-fixits = false
1413
// CHECK-NEXT: assume-controlled-environment = false
1514
// CHECK-NEXT: avoid-suppressing-null-argument-paths = false
@@ -111,6 +110,7 @@
111110
// CHECK-NEXT: optin.cplusplus.VirtualCall:ShowFixIts = false
112111
// CHECK-NEXT: optin.osx.cocoa.localizability.NonLocalizedStringChecker:AggressiveReport = false
113112
// CHECK-NEXT: optin.performance.Padding:AllowedPad = 24
113+
// CHECK-NEXT: optin.taint.TaintPropagation:Config = ""
114114
// CHECK-NEXT: osx.NumberObjectConversion:Pedantic = false
115115
// CHECK-NEXT: osx.cocoa.RetainCount:TrackNSCFStartParam = false
116116
// CHECK-NEXT: prune-paths = true

clang/test/Analysis/assume-controlled-environment.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %clang_analyze_cc1 -verify=untrusted-env %s \
22
// RUN: -analyzer-checker=core \
3-
// RUN: -analyzer-checker=alpha.security.taint \
3+
// RUN: -analyzer-checker=optin.taint \
44
// RUN: -analyzer-checker=debug.TaintTest
55

66
// RUN: %clang_analyze_cc1 -verify %s -DEXPECT_NO_WARNINGS \
77
// RUN: -analyzer-config assume-controlled-environment=true \
88
// RUN: -analyzer-checker=core \
9-
// RUN: -analyzer-checker=alpha.security.taint \
9+
// RUN: -analyzer-checker=optin.taint \
1010
// RUN: -analyzer-checker=debug.TaintTest
1111

1212

clang/test/Analysis/bool-assignment.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.BoolAssignment,alpha.security.taint -verify -std=c99 -Dbool=_Bool %s
2-
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.BoolAssignment,alpha.security.taint -verify -x c++ %s
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.BoolAssignment,optin.taint -verify -std=c99 -Dbool=_Bool %s
2+
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.BoolAssignment,optin.taint -verify -x c++ %s
33

44
// Test C++'s bool and C's _Bool.
55
// FIXME: We stopped warning on these when SValBuilder got smarter about

clang/test/Analysis/cxx-method-names.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix,osx,alpha.unix,alpha.security.taint -verify %s
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix,osx,alpha.unix,optin.taint -verify %s
22
// expected-no-diagnostics
33

44
class Evil {

clang/test/Analysis/debug-exprinspection-istainted.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clang_analyze_cc1 -verify %s \
22
// RUN: -analyzer-checker=core \
33
// RUN: -analyzer-checker=debug.ExprInspection \
4-
// RUN: -analyzer-checker=alpha.security.taint
4+
// RUN: -analyzer-checker=optin.taint
55

66
int scanf(const char *restrict format, ...);
77
void clang_analyzer_isTainted(char);

clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-diagnostics-taint-test.c.sarif

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"artifacts": [
66
{
7-
"length": 434,
7+
"length": 425,
88
"location": {
99
"index": 0,
1010
},

clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-diagnostic-test.c.sarif

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"artifacts": [
66
{
7-
"length": 1081,
7+
"length": 1071,
88
"location": {
99
"index": 0,
1010
},

clang/test/Analysis/diagnostics/sarif-diagnostics-taint-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify -analyzer-output=sarif -o - | %normalize_sarif | diff -U1 -b %S/Inputs/expected-sarif/sarif-diagnostics-taint-test.c.sarif -
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=optin.taint,debug.TaintTest %s -verify -analyzer-output=sarif -o - | %normalize_sarif | diff -U1 -b %S/Inputs/expected-sarif/sarif-diagnostics-taint-test.c.sarif -
22
#include "../Inputs/system-header-simulator.h"
33

44
int atoi(const char *nptr);

clang/test/Analysis/diagnostics/sarif-multi-diagnostic-test.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.security.taint,debug.TaintTest,unix.Malloc %s -verify -analyzer-output=sarif -o - | %normalize_sarif | diff -U1 -b %S/Inputs/expected-sarif/sarif-multi-diagnostic-test.c.sarif -
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=core,optin.taint,debug.TaintTest,unix.Malloc %s -verify -analyzer-output=sarif -o - | %normalize_sarif | diff -U1 -b %S/Inputs/expected-sarif/sarif-multi-diagnostic-test.c.sarif -
22
#include "../Inputs/system-header-simulator.h"
33
#include "../Inputs/system-header-simulator-for-malloc.h"
44
#define ERR -1
@@ -43,4 +43,3 @@ int main(void) {
4343
unicode();
4444
return 0;
4545
}
46-

clang/test/Analysis/fread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_analyze_cc1 -verify %s \
22
// RUN: -triple x86_64-linux-gnu \
3-
// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \
3+
// RUN: -analyzer-checker=core,unix.Stream,optin.taint \
44
// RUN: -analyzer-checker=debug.ExprInspection
55

66
#include "Inputs/system-header-simulator-for-simple-stream.h"

clang/test/Analysis/global-region-invalidation-errno.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -disable-free -verify %s \
2-
// RUN: -analyzer-checker=core,deadcode,alpha.security.taint \
2+
// RUN: -analyzer-checker=core,deadcode,optin.taint \
33
// RUN: -DERRNO_VAR
44

55
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -disable-free -verify %s \
6-
// RUN: -analyzer-checker=core,deadcode,alpha.security.taint \
6+
// RUN: -analyzer-checker=core,deadcode,optin.taint \
77
// RUN: -DERRNO_FUNC
88

99
// Note, we do need to include headers here, since the analyzer checks if the function declaration is located in a system header.

clang/test/Analysis/global-region-invalidation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -disable-free -verify %s \
2-
// RUN: -analyzer-checker=core,deadcode,alpha.security.taint,debug.TaintTest,debug.ExprInspection
2+
// RUN: -analyzer-checker=core,deadcode,optin.taint,debug.TaintTest,debug.ExprInspection
33

44
void clang_analyzer_eval(int);
55

clang/test/Analysis/malloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: -analyzer-checker=alpha.core.CastSize \
55
// RUN: -analyzer-checker=unix \
66
// RUN: -analyzer-checker=debug.ExprInspection \
7-
// RUN: -analyzer-checker=alpha.security.taint.TaintPropagation \
7+
// RUN: -analyzer-checker=optin.taint.TaintPropagation \
88
// RUN: -analyzer-checker=optin.taint.TaintedAlloc
99

1010
#include "Inputs/system-header-simulator.h"

clang/test/Analysis/malloc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: -analyzer-checker=alpha.core.CastSize \
55
// RUN: -analyzer-checker=unix.Malloc \
66
// RUN: -analyzer-checker=cplusplus.NewDelete \
7-
// RUN: -analyzer-checker=alpha.security.taint.TaintPropagation \
7+
// RUN: -analyzer-checker=optin.taint.TaintPropagation \
88
// RUN: -analyzer-checker=optin.taint.TaintedAlloc
99

1010
// RUN: %clang_analyze_cc1 -w -verify %s \
@@ -14,7 +14,7 @@
1414
// RUN: -analyzer-checker=alpha.core.CastSize \
1515
// RUN: -analyzer-checker=unix.Malloc \
1616
// RUN: -analyzer-checker=cplusplus.NewDelete \
17-
// RUN: -analyzer-checker=alpha.security.taint.TaintPropagation \
17+
// RUN: -analyzer-checker=optin.taint.TaintPropagation \
1818
// RUN: -analyzer-checker=optin.taint.TaintedAlloc
1919

2020
// RUN: %clang_analyze_cc1 -w -verify %s -DTEST_INLINABLE_ALLOCATORS \
@@ -23,7 +23,7 @@
2323
// RUN: -analyzer-checker=alpha.core.CastSize \
2424
// RUN: -analyzer-checker=unix.Malloc \
2525
// RUN: -analyzer-checker=cplusplus.NewDelete \
26-
// RUN: -analyzer-checker=alpha.security.taint.TaintPropagation \
26+
// RUN: -analyzer-checker=optin.taint.TaintPropagation \
2727
// RUN: -analyzer-checker=optin.taint.TaintedAlloc
2828

2929
// RUN: %clang_analyze_cc1 -w -verify %s -DTEST_INLINABLE_ALLOCATORS \
@@ -33,7 +33,7 @@
3333
// RUN: -analyzer-checker=alpha.core.CastSize \
3434
// RUN: -analyzer-checker=unix.Malloc \
3535
// RUN: -analyzer-checker=cplusplus.NewDelete \
36-
// RUN: -analyzer-checker=alpha.security.taint.TaintPropagation \
36+
// RUN: -analyzer-checker=optin.taint.TaintPropagation \
3737
// RUN: -analyzer-checker=optin.taint.TaintedAlloc
3838

3939
#include "Inputs/system-header-simulator-cxx.h"

clang/test/Analysis/out-of-bounds-diagnostics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-output=text \
2-
// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,alpha.security.taint -verify %s
2+
// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,optin.taint -verify %s
33

44
int TenElements[10];
55

clang/test/Analysis/out-of-bounds-notes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-output=text \
2-
// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,alpha.security.taint -verify %s
2+
// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,optin.taint -verify %s
33

44
int TenElements[10];
55

clang/test/Analysis/redefined_system.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=osx,unix,core,alpha.security.taint -w -verify %s
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=osx,unix,core,optin.taint -w -verify %s
22
// expected-no-diagnostics
33

44
// Make sure we don't crash when someone redefines a system function we reason about.

clang/test/Analysis/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// RUN: %clang_analyze_cc1 -verify %s -Wno-null-dereference \
2626
// RUN: -DUSE_BUILTINS -DVARIANT \
2727
// RUN: -analyzer-checker=core \
28-
// RUN: -analyzer-checker=alpha.security.taint \
28+
// RUN: -analyzer-checker=optin.taint \
2929
// RUN: -analyzer-checker=unix.cstring \
3030
// RUN: -analyzer-checker=unix.Malloc \
3131
// RUN: -analyzer-checker=alpha.unix.cstring \

clang/test/Analysis/taint-checker-callback-order-has-definition.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_analyze_cc1 %s \
2-
// RUN: -analyzer-checker=core,alpha.security.taint \
2+
// RUN: -analyzer-checker=core,optin.taint \
33
// RUN: -mllvm -debug-only=taint-checker \
44
// RUN: 2>&1 | FileCheck %s
55

clang/test/Analysis/taint-checker-callback-order-without-definition.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_analyze_cc1 %s \
2-
// RUN: -analyzer-checker=core,alpha.security.taint \
2+
// RUN: -analyzer-checker=core,optin.taint \
33
// RUN: -mllvm -debug-only=taint-checker \
44
// RUN: 2>&1 | FileCheck %s
55

clang/test/Analysis/taint-diagnostic-visitor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.security.taint,core,alpha.security.ArrayBoundV2,optin.taint.TaintedAlloc -analyzer-output=text -verify %s
1+
// RUN: %clang_cc1 -analyze -analyzer-checker=optin.taint,core,alpha.security.ArrayBoundV2,optin.taint.TaintedAlloc -analyzer-output=text -verify %s
22

33
// This file is for testing enhanced diagnostics produced by the GenericTaintChecker
44

clang/test/Analysis/taint-dumps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.security.taint\
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=optin.taint\
22
// RUN: -analyzer-checker=debug.ExprInspection %s\
33
// RUN: 2>&1 | FileCheck %s
44

clang/test/Analysis/taint-generic.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
// RUN: %clang_analyze_cc1 -Wno-format-security -Wno-pointer-to-int-cast \
22
// RUN: -Wno-incompatible-library-redeclaration -verify %s \
3-
// RUN: -analyzer-checker=alpha.security.taint \
3+
// RUN: -analyzer-checker=optin.taint.GenericTaint \
44
// RUN: -analyzer-checker=core \
55
// RUN: -analyzer-checker=alpha.security.ArrayBoundV2 \
66
// RUN: -analyzer-checker=debug.ExprInspection \
77
// RUN: -analyzer-config \
8-
// RUN: alpha.security.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml
8+
// RUN: optin.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml
99

1010
// RUN: %clang_analyze_cc1 -Wno-format-security -Wno-pointer-to-int-cast \
1111
// RUN: -Wno-incompatible-library-redeclaration -verify %s \
1212
// RUN: -DFILE_IS_STRUCT \
13-
// RUN: -analyzer-checker=alpha.security.taint \
13+
// RUN: -analyzer-checker=optin.taint.GenericTaint \
1414
// RUN: -analyzer-checker=core \
1515
// RUN: -analyzer-checker=alpha.security.ArrayBoundV2 \
1616
// RUN: -analyzer-checker=debug.ExprInspection \
1717
// RUN: -analyzer-config \
18-
// RUN: alpha.security.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml
18+
// RUN: optin.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml
1919

2020
// RUN: not %clang_analyze_cc1 -Wno-pointer-to-int-cast \
2121
// RUN: -Wno-incompatible-library-redeclaration -verify %s \
22-
// RUN: -analyzer-checker=alpha.security.taint \
22+
// RUN: -analyzer-checker=optin.taint.GenericTaint \
2323
// RUN: -analyzer-checker=debug.ExprInspection \
2424
// RUN: -analyzer-config \
25-
// RUN: alpha.security.taint.TaintPropagation:Config=justguessit \
25+
// RUN: optin.taint.TaintPropagation:Config=justguessit \
2626
// RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-FILE
2727

2828
// CHECK-INVALID-FILE: (frontend): invalid input for checker option
29-
// CHECK-INVALID-FILE-SAME: 'alpha.security.taint.TaintPropagation:Config',
29+
// CHECK-INVALID-FILE-SAME: 'optin.taint.TaintPropagation:Config',
3030
// CHECK-INVALID-FILE-SAME: that expects a valid filename instead of
3131
// CHECK-INVALID-FILE-SAME: 'justguessit'
3232

3333
// RUN: not %clang_analyze_cc1 -Wno-incompatible-library-redeclaration \
3434
// RUN: -verify %s \
35-
// RUN: -analyzer-checker=alpha.security.taint \
35+
// RUN: -analyzer-checker=optin.taint.GenericTaint \
3636
// RUN: -analyzer-checker=debug.ExprInspection \
3737
// RUN: -analyzer-config \
38-
// RUN: alpha.security.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config-ill-formed.yaml \
38+
// RUN: optin.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config-ill-formed.yaml \
3939
// RUN: 2>&1 | FileCheck -DMSG=%errc_EINVAL %s -check-prefix=CHECK-ILL-FORMED
4040

4141
// CHECK-ILL-FORMED: (frontend): invalid input for checker option
42-
// CHECK-ILL-FORMED-SAME: 'alpha.security.taint.TaintPropagation:Config',
42+
// CHECK-ILL-FORMED-SAME: 'optin.taint.TaintPropagation:Config',
4343
// CHECK-ILL-FORMED-SAME: that expects a valid yaml file: [[MSG]]
4444

4545
// RUN: not %clang_analyze_cc1 -Wno-incompatible-library-redeclaration \
4646
// RUN: -verify %s \
47-
// RUN: -analyzer-checker=alpha.security.taint \
47+
// RUN: -analyzer-checker=optin.taint.GenericTaint \
4848
// RUN: -analyzer-checker=debug.ExprInspection \
4949
// RUN: -analyzer-config \
50-
// RUN: alpha.security.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config-invalid-arg.yaml \
50+
// RUN: optin.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config-invalid-arg.yaml \
5151
// RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-ARG
5252

5353
// CHECK-INVALID-ARG: (frontend): invalid input for checker option
54-
// CHECK-INVALID-ARG-SAME: 'alpha.security.taint.TaintPropagation:Config',
54+
// CHECK-INVALID-ARG-SAME: 'optin.taint.TaintPropagation:Config',
5555
// CHECK-INVALID-ARG-SAME: that expects an argument number for propagation
5656
// CHECK-INVALID-ARG-SAME: rules greater or equal to -1
5757

clang/test/Analysis/taint-generic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.security.taint,core,alpha.security.ArrayBoundV2 -analyzer-config alpha.security.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml -Wno-format-security -verify -std=c++11 %s
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=optin.taint,core,alpha.security.ArrayBoundV2 -analyzer-config optin.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml -Wno-format-security -verify -std=c++11 %s
22

33
#define BUFSIZE 10
44
int Buffer[BUFSIZE];

clang/test/Analysis/taint-tester.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -Wno-int-to-pointer-cast -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify
1+
// RUN: %clang_analyze_cc1 -Wno-int-to-pointer-cast -analyzer-checker=optin.taint,debug.TaintTest %s -verify
22

33
#include "Inputs/system-header-simulator.h"
44

clang/test/Analysis/taint-tester.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=optin.taint,debug.TaintTest %s -verify
22
// expected-no-diagnostics
33

44
typedef struct _FILE FILE;
@@ -32,4 +32,3 @@ void testOpaqueClass(opaque *obj) {
3232
char buf[20];
3333
snprintf(buf, 20, "%p", obj); // don't crash trying to load *obj
3434
}
35-

0 commit comments

Comments
 (0)