CheckSecuritySyntaxOnly.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. //==- CheckSecuritySyntaxOnly.cpp - Basic security checks --------*- C++ -*-==//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file defines a set of flow-insensitive security checks.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #include "ClangSACheckers.h"
  14. #include "clang/StaticAnalyzer/Core/Checker.h"
  15. #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
  16. #include "clang/Basic/TargetInfo.h"
  17. #include "clang/AST/StmtVisitor.h"
  18. #include "llvm/Support/raw_ostream.h"
  19. #include "llvm/ADT/StringSwitch.h"
  20. using namespace clang;
  21. using namespace ento;
  22. static bool isArc4RandomAvailable(const ASTContext &Ctx) {
  23. const llvm::Triple &T = Ctx.Target.getTriple();
  24. return T.getVendor() == llvm::Triple::Apple ||
  25. T.getOS() == llvm::Triple::FreeBSD ||
  26. T.getOS() == llvm::Triple::NetBSD ||
  27. T.getOS() == llvm::Triple::OpenBSD ||
  28. T.getOS() == llvm::Triple::DragonFly;
  29. }
  30. namespace {
  31. class WalkAST : public StmtVisitor<WalkAST> {
  32. BugReporter &BR;
  33. enum { num_setids = 6 };
  34. IdentifierInfo *II_setid[num_setids];
  35. const bool CheckRand;
  36. public:
  37. WalkAST(BugReporter &br) : BR(br), II_setid(),
  38. CheckRand(isArc4RandomAvailable(BR.getContext())) {}
  39. // Statement visitor methods.
  40. void VisitCallExpr(CallExpr *CE);
  41. void VisitForStmt(ForStmt *S);
  42. void VisitCompoundStmt (CompoundStmt *S);
  43. void VisitStmt(Stmt *S) { VisitChildren(S); }
  44. void VisitChildren(Stmt *S);
  45. // Helpers.
  46. IdentifierInfo *getIdentifier(IdentifierInfo *& II, const char *str);
  47. bool checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD);
  48. typedef void (WalkAST::*FnCheck)(const CallExpr *,
  49. const FunctionDecl *);
  50. // Checker-specific methods.
  51. void checkLoopConditionForFloat(const ForStmt *FS);
  52. void checkCall_gets(const CallExpr *CE, const FunctionDecl *FD);
  53. void checkCall_getpw(const CallExpr *CE, const FunctionDecl *FD);
  54. void checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD);
  55. void checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD);
  56. void checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD);
  57. void checkCall_rand(const CallExpr *CE, const FunctionDecl *FD);
  58. void checkCall_random(const CallExpr *CE, const FunctionDecl *FD);
  59. void checkUncheckedReturnValue(CallExpr *CE);
  60. };
  61. } // end anonymous namespace
  62. //===----------------------------------------------------------------------===//
  63. // Helper methods.
  64. //===----------------------------------------------------------------------===//
  65. IdentifierInfo *WalkAST::getIdentifier(IdentifierInfo *& II, const char *str) {
  66. if (!II)
  67. II = &BR.getContext().Idents.get(str);
  68. return II;
  69. }
  70. //===----------------------------------------------------------------------===//
  71. // AST walking.
  72. //===----------------------------------------------------------------------===//
  73. void WalkAST::VisitChildren(Stmt *S) {
  74. for (Stmt::child_iterator I = S->child_begin(), E = S->child_end(); I!=E; ++I)
  75. if (Stmt *child = *I)
  76. Visit(child);
  77. }
  78. void WalkAST::VisitCallExpr(CallExpr *CE) {
  79. // Get the callee.
  80. const FunctionDecl *FD = CE->getDirectCallee();
  81. if (!FD)
  82. return;
  83. // Get the name of the callee. If it's a builtin, strip off the prefix.
  84. IdentifierInfo *II = FD->getIdentifier();
  85. if (!II) // if no identifier, not a simple C function
  86. return;
  87. llvm::StringRef Name = II->getName();
  88. if (Name.startswith("__builtin_"))
  89. Name = Name.substr(10);
  90. // Set the evaluation function by switching on the callee name.
  91. FnCheck evalFunction = llvm::StringSwitch<FnCheck>(Name)
  92. .Case("gets", &WalkAST::checkCall_gets)
  93. .Case("getpw", &WalkAST::checkCall_getpw)
  94. .Case("mktemp", &WalkAST::checkCall_mktemp)
  95. .Cases("strcpy", "__strcpy_chk", &WalkAST::checkCall_strcpy)
  96. .Cases("strcat", "__strcat_chk", &WalkAST::checkCall_strcat)
  97. .Case("drand48", &WalkAST::checkCall_rand)
  98. .Case("erand48", &WalkAST::checkCall_rand)
  99. .Case("jrand48", &WalkAST::checkCall_rand)
  100. .Case("lrand48", &WalkAST::checkCall_rand)
  101. .Case("mrand48", &WalkAST::checkCall_rand)
  102. .Case("nrand48", &WalkAST::checkCall_rand)
  103. .Case("lcong48", &WalkAST::checkCall_rand)
  104. .Case("rand", &WalkAST::checkCall_rand)
  105. .Case("rand_r", &WalkAST::checkCall_rand)
  106. .Case("random", &WalkAST::checkCall_random)
  107. .Default(NULL);
  108. // If the callee isn't defined, it is not of security concern.
  109. // Check and evaluate the call.
  110. if (evalFunction)
  111. (this->*evalFunction)(CE, FD);
  112. // Recurse and check children.
  113. VisitChildren(CE);
  114. }
  115. void WalkAST::VisitCompoundStmt(CompoundStmt *S) {
  116. for (Stmt::child_iterator I = S->child_begin(), E = S->child_end(); I!=E; ++I)
  117. if (Stmt *child = *I) {
  118. if (CallExpr *CE = dyn_cast<CallExpr>(child))
  119. checkUncheckedReturnValue(CE);
  120. Visit(child);
  121. }
  122. }
  123. void WalkAST::VisitForStmt(ForStmt *FS) {
  124. checkLoopConditionForFloat(FS);
  125. // Recurse and check children.
  126. VisitChildren(FS);
  127. }
  128. //===----------------------------------------------------------------------===//
  129. // Check: floating poing variable used as loop counter.
  130. // Originally: <rdar://problem/6336718>
  131. // Implements: CERT security coding advisory FLP-30.
  132. //===----------------------------------------------------------------------===//
  133. static const DeclRefExpr*
  134. getIncrementedVar(const Expr *expr, const VarDecl *x, const VarDecl *y) {
  135. expr = expr->IgnoreParenCasts();
  136. if (const BinaryOperator *B = dyn_cast<BinaryOperator>(expr)) {
  137. if (!(B->isAssignmentOp() || B->isCompoundAssignmentOp() ||
  138. B->getOpcode() == BO_Comma))
  139. return NULL;
  140. if (const DeclRefExpr *lhs = getIncrementedVar(B->getLHS(), x, y))
  141. return lhs;
  142. if (const DeclRefExpr *rhs = getIncrementedVar(B->getRHS(), x, y))
  143. return rhs;
  144. return NULL;
  145. }
  146. if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(expr)) {
  147. const NamedDecl *ND = DR->getDecl();
  148. return ND == x || ND == y ? DR : NULL;
  149. }
  150. if (const UnaryOperator *U = dyn_cast<UnaryOperator>(expr))
  151. return U->isIncrementDecrementOp()
  152. ? getIncrementedVar(U->getSubExpr(), x, y) : NULL;
  153. return NULL;
  154. }
  155. /// CheckLoopConditionForFloat - This check looks for 'for' statements that
  156. /// use a floating point variable as a loop counter.
  157. /// CERT: FLP30-C, FLP30-CPP.
  158. ///
  159. void WalkAST::checkLoopConditionForFloat(const ForStmt *FS) {
  160. // Does the loop have a condition?
  161. const Expr *condition = FS->getCond();
  162. if (!condition)
  163. return;
  164. // Does the loop have an increment?
  165. const Expr *increment = FS->getInc();
  166. if (!increment)
  167. return;
  168. // Strip away '()' and casts.
  169. condition = condition->IgnoreParenCasts();
  170. increment = increment->IgnoreParenCasts();
  171. // Is the loop condition a comparison?
  172. const BinaryOperator *B = dyn_cast<BinaryOperator>(condition);
  173. if (!B)
  174. return;
  175. // Is this a comparison?
  176. if (!(B->isRelationalOp() || B->isEqualityOp()))
  177. return;
  178. // Are we comparing variables?
  179. const DeclRefExpr *drLHS =
  180. dyn_cast<DeclRefExpr>(B->getLHS()->IgnoreParenLValueCasts());
  181. const DeclRefExpr *drRHS =
  182. dyn_cast<DeclRefExpr>(B->getRHS()->IgnoreParenLValueCasts());
  183. // Does at least one of the variables have a floating point type?
  184. drLHS = drLHS && drLHS->getType()->isRealFloatingType() ? drLHS : NULL;
  185. drRHS = drRHS && drRHS->getType()->isRealFloatingType() ? drRHS : NULL;
  186. if (!drLHS && !drRHS)
  187. return;
  188. const VarDecl *vdLHS = drLHS ? dyn_cast<VarDecl>(drLHS->getDecl()) : NULL;
  189. const VarDecl *vdRHS = drRHS ? dyn_cast<VarDecl>(drRHS->getDecl()) : NULL;
  190. if (!vdLHS && !vdRHS)
  191. return;
  192. // Does either variable appear in increment?
  193. const DeclRefExpr *drInc = getIncrementedVar(increment, vdLHS, vdRHS);
  194. if (!drInc)
  195. return;
  196. // Emit the error. First figure out which DeclRefExpr in the condition
  197. // referenced the compared variable.
  198. const DeclRefExpr *drCond = vdLHS == drInc->getDecl() ? drLHS : drRHS;
  199. llvm::SmallVector<SourceRange, 2> ranges;
  200. llvm::SmallString<256> sbuf;
  201. llvm::raw_svector_ostream os(sbuf);
  202. os << "Variable '" << drCond->getDecl()->getName()
  203. << "' with floating point type '" << drCond->getType().getAsString()
  204. << "' should not be used as a loop counter";
  205. ranges.push_back(drCond->getSourceRange());
  206. ranges.push_back(drInc->getSourceRange());
  207. const char *bugType = "Floating point variable used as loop counter";
  208. BR.EmitBasicReport(bugType, "Security", os.str(),
  209. FS->getLocStart(), ranges.data(), ranges.size());
  210. }
  211. //===----------------------------------------------------------------------===//
  212. // Check: Any use of 'gets' is insecure.
  213. // Originally: <rdar://problem/6335715>
  214. // Implements (part of): 300-BSI (buildsecurityin.us-cert.gov)
  215. // CWE-242: Use of Inherently Dangerous Function
  216. //===----------------------------------------------------------------------===//
  217. void WalkAST::checkCall_gets(const CallExpr *CE, const FunctionDecl *FD) {
  218. const FunctionProtoType *FPT
  219. = dyn_cast<FunctionProtoType>(FD->getType().IgnoreParens());
  220. if (!FPT)
  221. return;
  222. // Verify that the function takes a single argument.
  223. if (FPT->getNumArgs() != 1)
  224. return;
  225. // Is the argument a 'char*'?
  226. const PointerType *PT = dyn_cast<PointerType>(FPT->getArgType(0));
  227. if (!PT)
  228. return;
  229. if (PT->getPointeeType().getUnqualifiedType() != BR.getContext().CharTy)
  230. return;
  231. // Issue a warning.
  232. SourceRange R = CE->getCallee()->getSourceRange();
  233. BR.EmitBasicReport("Potential buffer overflow in call to 'gets'",
  234. "Security",
  235. "Call to function 'gets' is extremely insecure as it can "
  236. "always result in a buffer overflow",
  237. CE->getLocStart(), &R, 1);
  238. }
  239. //===----------------------------------------------------------------------===//
  240. // Check: Any use of 'getpwd' is insecure.
  241. // CWE-477: Use of Obsolete Functions
  242. //===----------------------------------------------------------------------===//
  243. void WalkAST::checkCall_getpw(const CallExpr *CE, const FunctionDecl *FD) {
  244. const FunctionProtoType *FPT
  245. = dyn_cast<FunctionProtoType>(FD->getType().IgnoreParens());
  246. if (!FPT)
  247. return;
  248. // Verify that the function takes two arguments.
  249. if (FPT->getNumArgs() != 2)
  250. return;
  251. // Verify the first argument type is integer.
  252. if (!FPT->getArgType(0)->isIntegerType())
  253. return;
  254. // Verify the second argument type is char*.
  255. const PointerType *PT = dyn_cast<PointerType>(FPT->getArgType(1));
  256. if (!PT)
  257. return;
  258. if (PT->getPointeeType().getUnqualifiedType() != BR.getContext().CharTy)
  259. return;
  260. // Issue a warning.
  261. SourceRange R = CE->getCallee()->getSourceRange();
  262. BR.EmitBasicReport("Potential buffer overflow in call to 'getpw'",
  263. "Security",
  264. "The getpw() function is dangerous as it may overflow the "
  265. "provided buffer. It is obsoleted by getpwuid().",
  266. CE->getLocStart(), &R, 1);
  267. }
  268. //===----------------------------------------------------------------------===//
  269. // Check: Any use of 'mktemp' is insecure.It is obsoleted by mkstemp().
  270. // CWE-377: Insecure Temporary File
  271. //===----------------------------------------------------------------------===//
  272. void WalkAST::checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD) {
  273. const FunctionProtoType *FPT
  274. = dyn_cast<FunctionProtoType>(FD->getType().IgnoreParens());
  275. if(!FPT)
  276. return;
  277. // Verify that the function takes a single argument.
  278. if (FPT->getNumArgs() != 1)
  279. return;
  280. // Verify that the argument is Pointer Type.
  281. const PointerType *PT = dyn_cast<PointerType>(FPT->getArgType(0));
  282. if (!PT)
  283. return;
  284. // Verify that the argument is a 'char*'.
  285. if (PT->getPointeeType().getUnqualifiedType() != BR.getContext().CharTy)
  286. return;
  287. // Issue a waring.
  288. SourceRange R = CE->getCallee()->getSourceRange();
  289. BR.EmitBasicReport("Potential insecure temporary file in call 'mktemp'",
  290. "Security",
  291. "Call to function 'mktemp' is insecure as it always "
  292. "creates or uses insecure temporary file. Use 'mkstemp' instead",
  293. CE->getLocStart(), &R, 1);
  294. }
  295. //===----------------------------------------------------------------------===//
  296. // Check: Any use of 'strcpy' is insecure.
  297. //
  298. // CWE-119: Improper Restriction of Operations within
  299. // the Bounds of a Memory Buffer
  300. //===----------------------------------------------------------------------===//
  301. void WalkAST::checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD) {
  302. if (!checkCall_strCommon(CE, FD))
  303. return;
  304. // Issue a warning.
  305. SourceRange R = CE->getCallee()->getSourceRange();
  306. BR.EmitBasicReport("Potential insecure memory buffer bounds restriction in "
  307. "call 'strcpy'",
  308. "Security",
  309. "Call to function 'strcpy' is insecure as it does not "
  310. "provide bounding of the memory buffer. Replace "
  311. "unbounded copy functions with analogous functions that "
  312. "support length arguments such as 'strncpy'. CWE-119.",
  313. CE->getLocStart(), &R, 1);
  314. }
  315. //===----------------------------------------------------------------------===//
  316. // Check: Any use of 'strcat' is insecure.
  317. //
  318. // CWE-119: Improper Restriction of Operations within
  319. // the Bounds of a Memory Buffer
  320. //===----------------------------------------------------------------------===//
  321. void WalkAST::checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD) {
  322. if (!checkCall_strCommon(CE, FD))
  323. return;
  324. // Issue a warning.
  325. SourceRange R = CE->getCallee()->getSourceRange();
  326. BR.EmitBasicReport("Potential insecure memory buffer bounds restriction in "
  327. "call 'strcat'",
  328. "Security",
  329. "Call to function 'strcat' is insecure as it does not "
  330. "provide bounding of the memory buffer. Replace "
  331. "unbounded copy functions with analogous functions that "
  332. "support length arguments such as 'strncat'. CWE-119.",
  333. CE->getLocStart(), &R, 1);
  334. }
  335. //===----------------------------------------------------------------------===//
  336. // Common check for str* functions with no bounds parameters.
  337. //===----------------------------------------------------------------------===//
  338. bool WalkAST::checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD) {
  339. const FunctionProtoType *FPT
  340. = dyn_cast<FunctionProtoType>(FD->getType().IgnoreParens());
  341. if (!FPT)
  342. return false;
  343. // Verify the function takes two arguments, three in the _chk version.
  344. int numArgs = FPT->getNumArgs();
  345. if (numArgs != 2 && numArgs != 3)
  346. return false;
  347. // Verify the type for both arguments.
  348. for (int i = 0; i < 2; i++) {
  349. // Verify that the arguments are pointers.
  350. const PointerType *PT = dyn_cast<PointerType>(FPT->getArgType(i));
  351. if (!PT)
  352. return false;
  353. // Verify that the argument is a 'char*'.
  354. if (PT->getPointeeType().getUnqualifiedType() != BR.getContext().CharTy)
  355. return false;
  356. }
  357. return true;
  358. }
  359. //===----------------------------------------------------------------------===//
  360. // Check: Linear congruent random number generators should not be used
  361. // Originally: <rdar://problem/63371000>
  362. // CWE-338: Use of cryptographically weak prng
  363. //===----------------------------------------------------------------------===//
  364. void WalkAST::checkCall_rand(const CallExpr *CE, const FunctionDecl *FD) {
  365. if (!CheckRand)
  366. return;
  367. const FunctionProtoType *FTP
  368. = dyn_cast<FunctionProtoType>(FD->getType().IgnoreParens());
  369. if (!FTP)
  370. return;
  371. if (FTP->getNumArgs() == 1) {
  372. // Is the argument an 'unsigned short *'?
  373. // (Actually any integer type is allowed.)
  374. const PointerType *PT = dyn_cast<PointerType>(FTP->getArgType(0));
  375. if (!PT)
  376. return;
  377. if (! PT->getPointeeType()->isIntegerType())
  378. return;
  379. }
  380. else if (FTP->getNumArgs() != 0)
  381. return;
  382. // Issue a warning.
  383. llvm::SmallString<256> buf1;
  384. llvm::raw_svector_ostream os1(buf1);
  385. os1 << '\'' << FD << "' is a poor random number generator";
  386. llvm::SmallString<256> buf2;
  387. llvm::raw_svector_ostream os2(buf2);
  388. os2 << "Function '" << FD
  389. << "' is obsolete because it implements a poor random number generator."
  390. << " Use 'arc4random' instead";
  391. SourceRange R = CE->getCallee()->getSourceRange();
  392. BR.EmitBasicReport(os1.str(), "Security", os2.str(),CE->getLocStart(), &R, 1);
  393. }
  394. //===----------------------------------------------------------------------===//
  395. // Check: 'random' should not be used
  396. // Originally: <rdar://problem/63371000>
  397. //===----------------------------------------------------------------------===//
  398. void WalkAST::checkCall_random(const CallExpr *CE, const FunctionDecl *FD) {
  399. if (!CheckRand)
  400. return;
  401. const FunctionProtoType *FTP
  402. = dyn_cast<FunctionProtoType>(FD->getType().IgnoreParens());
  403. if (!FTP)
  404. return;
  405. // Verify that the function takes no argument.
  406. if (FTP->getNumArgs() != 0)
  407. return;
  408. // Issue a warning.
  409. SourceRange R = CE->getCallee()->getSourceRange();
  410. BR.EmitBasicReport("'random' is not a secure random number generator",
  411. "Security",
  412. "The 'random' function produces a sequence of values that "
  413. "an adversary may be able to predict. Use 'arc4random' "
  414. "instead", CE->getLocStart(), &R, 1);
  415. }
  416. //===----------------------------------------------------------------------===//
  417. // Check: Should check whether privileges are dropped successfully.
  418. // Originally: <rdar://problem/6337132>
  419. //===----------------------------------------------------------------------===//
  420. void WalkAST::checkUncheckedReturnValue(CallExpr *CE) {
  421. const FunctionDecl *FD = CE->getDirectCallee();
  422. if (!FD)
  423. return;
  424. if (II_setid[0] == NULL) {
  425. static const char * const identifiers[num_setids] = {
  426. "setuid", "setgid", "seteuid", "setegid",
  427. "setreuid", "setregid"
  428. };
  429. for (size_t i = 0; i < num_setids; i++)
  430. II_setid[i] = &BR.getContext().Idents.get(identifiers[i]);
  431. }
  432. const IdentifierInfo *id = FD->getIdentifier();
  433. size_t identifierid;
  434. for (identifierid = 0; identifierid < num_setids; identifierid++)
  435. if (id == II_setid[identifierid])
  436. break;
  437. if (identifierid >= num_setids)
  438. return;
  439. const FunctionProtoType *FTP
  440. = dyn_cast<FunctionProtoType>(FD->getType().IgnoreParens());
  441. if (!FTP)
  442. return;
  443. // Verify that the function takes one or two arguments (depending on
  444. // the function).
  445. if (FTP->getNumArgs() != (identifierid < 4 ? 1 : 2))
  446. return;
  447. // The arguments must be integers.
  448. for (unsigned i = 0; i < FTP->getNumArgs(); i++)
  449. if (! FTP->getArgType(i)->isIntegerType())
  450. return;
  451. // Issue a warning.
  452. llvm::SmallString<256> buf1;
  453. llvm::raw_svector_ostream os1(buf1);
  454. os1 << "Return value is not checked in call to '" << FD << '\'';
  455. llvm::SmallString<256> buf2;
  456. llvm::raw_svector_ostream os2(buf2);
  457. os2 << "The return value from the call to '" << FD
  458. << "' is not checked. If an error occurs in '" << FD
  459. << "', the following code may execute with unexpected privileges";
  460. SourceRange R = CE->getCallee()->getSourceRange();
  461. BR.EmitBasicReport(os1.str(), "Security", os2.str(),CE->getLocStart(), &R, 1);
  462. }
  463. //===----------------------------------------------------------------------===//
  464. // SecuritySyntaxChecker
  465. //===----------------------------------------------------------------------===//
  466. namespace {
  467. class SecuritySyntaxChecker : public Checker<check::ASTCodeBody> {
  468. public:
  469. void checkASTCodeBody(const Decl *D, AnalysisManager& mgr,
  470. BugReporter &BR) const {
  471. WalkAST walker(BR);
  472. walker.Visit(D->getBody());
  473. }
  474. };
  475. }
  476. void ento::registerSecuritySyntaxChecker(CheckerManager &mgr) {
  477. mgr.registerChecker<SecuritySyntaxChecker>();
  478. }