CommandProcessorCheck.h 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. //===--- CommandInterpreterCheck.h - clang-tidy------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_COMMAND_PROCESSOR_CHECK_H
  9. #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_COMMAND_PROCESSOR_CHECK_H
  10. #include "../ClangTidyCheck.h"
  11. namespace clang::tidy::cert {
  12. /// Execution of a command processor can lead to security vulnerabilities,
  13. /// and is generally not required. Instead, prefer to launch executables
  14. /// directly via mechanisms that give you more control over what executable is
  15. /// actually launched.
  16. ///
  17. /// For the user-facing documentation see:
  18. /// http://clang.llvm.org/extra/clang-tidy/checks/cert/env33-c.html
  19. class CommandProcessorCheck : public ClangTidyCheck {
  20. public:
  21. CommandProcessorCheck(StringRef Name, ClangTidyContext *Context)
  22. : ClangTidyCheck(Name, Context) {}
  23. void registerMatchers(ast_matchers::MatchFinder *Finder) override;
  24. void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
  25. };
  26. } // namespace clang::tidy::cert
  27. #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_COMMAND_PROCESSOR_CHECK_H