- Notifications
You must be signed in to change notification settings - Fork8
ColdFusion / CFML Code Security Scanner
License
foundeo/fixinator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
If you are familiar with CommandBox simply run the command:
box install fixinatorCheck out theGetting Started Guide or theWiki for more info.
When running thefixinator command via the command line you can set the following arguments:
The folder or file to scan. As of version 2.0 you can also pass afile globber pattern, eg:path=c:\code\**.cfc
Default:high
Possible values arenone,low,medium orhigh. This setting is used to filter out results that the scanner is not confident about. Setting it to a lower value will show more issues but may have some false positives.
Default:low
Possible values are:low,medium orhigh. Filter by severity of the issues found.
Default:off
off- does not fix codeprompt- prompts at each issue that can be fixed, if you select a fix the file will be updated with the fix codeauto- does not prompt, it will fix each issue with the first choice
It is highly recommended that you useautofix only with code that is under version control so you can review the diff.
Writes results to a file specified by the path in resultFile. You may specify a comma separated list of paths if you want to write multiple formats.
Specify a format for theresultFile:json (default),html,pdf,csv,junit,sast, orfindbugs. You may specify a comma separated list of formats andresultFile paths if you want to write multiple files.
A file globber pattern of paths to ignore from the scan.
Default:true - When true returns an exit code of1 when issues are found, this will cause your build to fail if you are running in CI. If you do not want the build to fail when issues are found, set this tofalse.
Default:false - Prints out a list of scanners supported by the server in the results. Automatically set totrue whenverbose istrue
Default:false - Whentrue scans only files changed in the HEAD git commit, this is useful in CI to scan only the files changed in a specific commit.
Default:false - Whentrue scans only the files changed in the working copy (compared to the HEAD git commit). This is useful to scan only the files you have modified since your last git commit.
Default:lucee,adobe - A comma separated list of CFML engines that your code will run on. This setting is useful to exclude issues specific to Lucee, or Adobe ColdFusion if you only use one or the other. You can pass the list using version numbers as well, for example:engines=adobe@2021,adobe@2023 orengines=lucee@6,adobe@2023 - it follows the same syntax used by the commandbox server command'scfengine argument.
Added in Fixinator version 4.
Default:Empty - A comma separated list of scanners ids to scan (use--listScanners to see the options). For example if you only want to scan for SQL Injection, you can use:includeScanners=sqlinjection and you will only see SQL Injection Results.
Added in Fixinator version 4.
The path to a.fixinator.json configuration file to use. See below for details on the file contents. The command line argument overrides the default search path (looking in the base directory).
Default:security - a comma separated list of goals for the scan. Possible values aresecurity andcompatibility
When thecompatibility goal is passed it will return compatibility issues found in the code for theengines specified. Typically when you use thecompatibility mode you will specify theengines argument as well. Example
fixinator path=c:\mycode\ goals=security,compatibility engines=adobe@2023Added in Fixinator Version 5.
Default:false - when true outputs json results to the console
Added in Fixinator Version 6.1.0
Default:false - when true requires that the enterprise version is installed locally, for a local scan.
Added in Fixinator Version 6.1.0
The following environment variables are used by fixinator:
TheFIXINATOR_API_KEY environment variable holds an API key which will be passed to the Fixinator API service via thex-api-key HTTP request header. Please visithttps://fixinator.app/ to obtain a key.
You can also set this value by running:
box config set modules.fixinator.api_key=YOUR_API_KEYTheFIXINATOR_API_URL environment variable points to the URL of the Fixinator API service. If you are running fixinator locally you will want to point this to your local API instance (enterprise edition). If you are using the public API then you do not need to set this variable.
You can also set this value by running:
box config set modules.fixinator.api_url=http://127.0.0.1:1234/scan/TheFIXINATOR_MAX_PAYLOAD_SIZE environment variables controls the size of a payload that is sent to the fixinator api server at a time, as well as the max file size. The unit for this setting is bytes.
You can also set this value by running:
box config set modules.fixinator.max_payload_size=numberOfBytesThis variable should only be used with the enterprise edition otherwise you may run into issues.
TheFIXINATOR_MAX_PAYLOAD_FILE_COUNT environment variables controls the maximum number of files sent the fixinator api server at a time.
You can also set this value by running:
box config set modules.fixinator.max_payload_file_count=numberOfFilesThis variable should only be used with the enterprise edition otherwise you may run into issues.
TheFIXINATOR_API_TIMEOUT environment variables specifies the http timeout for connecting to thefixinator api server.
You can also set this value by running:
box config set modules.fixinator.api_timeout=35This variable should only be used with the enterprise edition.
TheFIXINATOR_MAX_CONCURRENCY environment variable specifies the maximum number ofthreads to use
You can also set this value by running:
box config set modules.fixinator.max_concurrency=8The default value is8
A.fixinator.json configuration file can be placed in the root of a folder to be scanned. For Example:
{"ignorePaths":["some/folder-to-ignore", "some/file-to-ignore.cfm"],"ignoreExtensions":["ign","ore"],"ignoreScanners":["xss"],"minSeverity": "low","minConfidence": "low","ignorePatterns": {},"engines": ["lucee","adobe"],"includeScanners":[]}Note that.fixinator.json files placed in a subfolder of the base scan path are currently ignored.
As of Fixinator version 4 you can now specify theconfigFile=/path/to/.fixinator.json to override the default path.
An array of path patterns to ignore. Certain paths are always ignored such as.git or.svn paths.
An array of file extensions to ignore. Certain file extensions such as image files (png, gif, jpg, etc) are always ignored.
An array of scanner name slugs to ignore. For example["sqlinjection","xss","pathtraversal"] would ignore or omit the results of theSQL Injection Scanner theCross Site Scripting (XSS) Scanner and thePath Traversal scanner.
Default:low - The minimum severity level that will be flagged. Set this tohigh if you only care about severe issues.
Default:high - The minimum confidence level that will be flagged. Issues withlow confidence will be more likely to be false positives.
Some applications may have their own functions for safely encoding varaibles to prevent Cross Site Scripting (XSS). Suppose you have acustomEncodeHTML() function that is similar toencodeForHTML(), we can tell Fixinator's XSS scanner to ignore variables that have thecustomEncodeHTML function call
"ignorePatterns": {"xss": ["customEncodeHTML("]}Now suppose you have an a few application variables that are used in SQL, they are not vulnerable to SQL injection because they are hard coded in the application. We can ignore those by adding some patterns for thesqlinjection scanner:
"ignorePatterns": {"xss": ["customEncodeHTML("],"sqlinjection": ["application.table_prefix", "application.items_per_page"]}This is a very powerful feature, so make sure you only use it on variables, functions or patterns you know are safe.
An array of CFML engines that the code runs on.
An array of scanner ids which to use, all other scanners will be ignored.
You can ignore an issue in your source code by adding a comment like this:
<cfquery>SELECT x FROM table<!--- ignore:sqlinjection - #id# is not vulnerable to SQL injection because of XYZ --->WHERE id = #id#</cfquery>The comment must be on the same line as the issue, or on the line above the issue. It must includeignore:issueType whereissueType is the fixinator id type for the issue. Fully supported in cfscript as well, for example:
//ignore:iif - b and a are safe variables because... x = iif(c, b, a);Also take a look at theignorePatterns object in the.fixinator.json file for another way to ignore code from fixinator.
About
ColdFusion / CFML Code Security Scanner
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
