github.com/devseccon/trivy@v0.47.1-0.20231123133102-bd902a0bd996/pkg/fanal/analyzer/const.go (about)

     1  package analyzer
     2  
     3  import "github.com/aquasecurity/trivy-iac/pkg/detection"
     4  
     5  type Type string
     6  
     7  const (
     8  	// ======
     9  	//   OS
    10  	// ======
    11  	TypeOSRelease  Type = "os-release"
    12  	TypeAlpine     Type = "alpine"
    13  	TypeAmazon     Type = "amazon"
    14  	TypeCBLMariner Type = "cbl-mariner"
    15  	TypeDebian     Type = "debian"
    16  	TypePhoton     Type = "photon"
    17  	TypeCentOS     Type = "centos"
    18  	TypeRocky      Type = "rocky"
    19  	TypeAlma       Type = "alma"
    20  	TypeFedora     Type = "fedora"
    21  	TypeOracle     Type = "oracle"
    22  	TypeRedHatBase Type = "redhat"
    23  	TypeSUSE       Type = "suse"
    24  	TypeUbuntu     Type = "ubuntu"
    25  	TypeUbuntuESM  Type = "ubuntu-esm"
    26  
    27  	// OS Package
    28  	TypeApk         Type = "apk"
    29  	TypeDpkg        Type = "dpkg"
    30  	TypeDpkgLicense Type = "dpkg-license" // For analyzing licenses
    31  	TypeRpm         Type = "rpm"
    32  	TypeRpmqa       Type = "rpmqa"
    33  
    34  	// OS Package Repository
    35  	TypeApkRepo Type = "apk-repo"
    36  
    37  	// ============================
    38  	// Programming Language Package
    39  	// ============================
    40  
    41  	// Ruby
    42  	TypeBundler Type = "bundler"
    43  	TypeGemSpec Type = "gemspec"
    44  
    45  	// Rust
    46  	TypeRustBinary Type = "rustbinary"
    47  	TypeCargo      Type = "cargo"
    48  
    49  	// PHP
    50  	TypeComposer Type = "composer"
    51  
    52  	// Java
    53  	TypeJar        Type = "jar"
    54  	TypePom        Type = "pom"
    55  	TypeGradleLock Type = "gradle-lockfile"
    56  
    57  	// Node.js
    58  	TypeNpmPkgLock Type = "npm"
    59  	TypeNodePkg    Type = "node-pkg"
    60  	TypeYarn       Type = "yarn"
    61  	TypePnpm       Type = "pnpm"
    62  
    63  	// .NET
    64  	TypeNuget      Type = "nuget"
    65  	TypeDotNetCore Type = "dotnet-core"
    66  
    67  	// Conda
    68  	TypeCondaPkg Type = "conda-pkg"
    69  
    70  	// Python
    71  	TypePythonPkg Type = "python-pkg"
    72  	TypePip       Type = "pip"
    73  	TypePipenv    Type = "pipenv"
    74  	TypePoetry    Type = "poetry"
    75  
    76  	// Go
    77  	TypeGoBinary Type = "gobinary"
    78  	TypeGoMod    Type = "gomod"
    79  
    80  	// C/C++
    81  	TypeConanLock Type = "conan-lock"
    82  
    83  	// Elixir
    84  	TypeMixLock Type = "mix-lock"
    85  
    86  	// Swift
    87  	TypeSwift     Type = "swift"
    88  	TypeCocoaPods Type = "cocoapods"
    89  
    90  	// Dart
    91  	TypePubSpecLock Type = "pubspec-lock"
    92  
    93  	// ============
    94  	// Non-packaged
    95  	// ============
    96  	TypeExecutable Type = "executable"
    97  	TypeSBOM       Type = "sbom"
    98  
    99  	// ============
   100  	// Image Config
   101  	// ============
   102  	TypeApkCommand        Type = "apk-command"
   103  	TypeHistoryDockerfile Type = "history-dockerfile"
   104  	TypeImageConfigSecret Type = "image-config-secret"
   105  
   106  	// =================
   107  	// Structured Config
   108  	// =================
   109  	TypeAzureARM       Type = Type(detection.FileTypeAzureARM)
   110  	TypeCloudFormation Type = Type(detection.FileTypeCloudFormation)
   111  	TypeDockerfile     Type = Type(detection.FileTypeDockerfile)
   112  	TypeHelm           Type = Type(detection.FileTypeHelm)
   113  	TypeKubernetes     Type = Type(detection.FileTypeKubernetes)
   114  	TypeTerraform      Type = Type(detection.FileTypeTerraform)
   115  	TypeTerraformPlan  Type = Type(detection.FileTypeTerraformPlan)
   116  
   117  	// ========
   118  	// License
   119  	// ========
   120  	TypeLicenseFile Type = "license-file"
   121  
   122  	// ========
   123  	// Secrets
   124  	// ========
   125  	TypeSecret Type = "secret"
   126  
   127  	// =======
   128  	// Red Hat
   129  	// =======
   130  	TypeRedHatContentManifestType Type = "redhat-content-manifest"
   131  	TypeRedHatDockerfileType      Type = "redhat-dockerfile"
   132  )
   133  
   134  var (
   135  	// TypeOSes has all OS-related analyzers
   136  	TypeOSes = []Type{
   137  		TypeOSRelease,
   138  		TypeAlpine,
   139  		TypeAmazon,
   140  		TypeCBLMariner,
   141  		TypeDebian,
   142  		TypePhoton,
   143  		TypeCentOS,
   144  		TypeRocky,
   145  		TypeAlma,
   146  		TypeFedora,
   147  		TypeOracle,
   148  		TypeRedHatBase,
   149  		TypeSUSE,
   150  		TypeUbuntu,
   151  		TypeApk,
   152  		TypeDpkg,
   153  		TypeDpkgLicense,
   154  		TypeRpm,
   155  		TypeRpmqa,
   156  		TypeApkRepo,
   157  	}
   158  
   159  	// TypeLanguages has all language analyzers
   160  	TypeLanguages = []Type{
   161  		TypeBundler,
   162  		TypeGemSpec,
   163  		TypeCargo,
   164  		TypeComposer,
   165  		TypeJar,
   166  		TypePom,
   167  		TypeGradleLock,
   168  		TypeNpmPkgLock,
   169  		TypeNodePkg,
   170  		TypeYarn,
   171  		TypePnpm,
   172  		TypeNuget,
   173  		TypeDotNetCore,
   174  		TypeCondaPkg,
   175  		TypePythonPkg,
   176  		TypePip,
   177  		TypePipenv,
   178  		TypePoetry,
   179  		TypeGoBinary,
   180  		TypeGoMod,
   181  		TypeRustBinary,
   182  		TypeConanLock,
   183  		TypeCocoaPods,
   184  		TypeSwift,
   185  		TypePubSpecLock,
   186  		TypeMixLock,
   187  	}
   188  
   189  	// TypeLockfiles has all lock file analyzers
   190  	TypeLockfiles = []Type{
   191  		TypeBundler,
   192  		TypeNpmPkgLock,
   193  		TypeYarn,
   194  		TypePnpm,
   195  		TypePip,
   196  		TypePipenv,
   197  		TypePoetry,
   198  		TypeGoMod,
   199  		TypePom,
   200  		TypeConanLock,
   201  		TypeGradleLock,
   202  		TypeCocoaPods,
   203  		TypeSwift,
   204  		TypePubSpecLock,
   205  		TypeMixLock,
   206  	}
   207  
   208  	// TypeIndividualPkgs has all analyzers for individual packages
   209  	TypeIndividualPkgs = []Type{
   210  		TypeGemSpec,
   211  		TypeNodePkg,
   212  		TypeCondaPkg,
   213  		TypePythonPkg,
   214  		TypeGoBinary,
   215  		TypeJar,
   216  		TypeRustBinary,
   217  	}
   218  
   219  	// TypeConfigFiles has all config file analyzers
   220  	TypeConfigFiles = []Type{
   221  		TypeAzureARM,
   222  		TypeCloudFormation,
   223  		TypeDockerfile,
   224  		TypeHelm,
   225  		TypeKubernetes,
   226  		TypeTerraform,
   227  		TypeTerraformPlan,
   228  	}
   229  )