Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
bitbucket-iac-scan — Scans Infrastructure as Code files for security misconfigurations and vulnerabilities using KICS, with Bitbucket Code Insights reporting. | Kitploit
Tools/BitbucketBitbucket/atlassian/bitbucket-iac-scan
Cloud Infrastructure SecurityStatic AnalysisVulnerability ScannersContainer SecurityCode AnalysisConfiguration AuditingDevSecOpsMisconfiguration
Bitbucketatlassian/bitbucket-iac-scan

bitbucket-iac-scan

Scans Infrastructure as Code files for security misconfigurations and vulnerabilities using KICS, with Bitbucket Code Insights reporting.

View Repository
1 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Bitbucket Security: Infrastructure as Code Security Scanner

Scans your Infrastructure as Code configuration files to ensure good security practises. Creates a security Code Insights report if issue is found.

This Bitbucket Cloud supported Pipe leverages the industry leading KICS scanning tool to provide IaC Scanning capabilities to Bitbucket customers. See Details and Examples section for more information.

YAML Definition

Add the following snippet to the script section of your bitbucket-pipelines.yml file:

root@kitploit:~
- pipe: atlassian/bitbucket-iac-scan:0.5.2
  variables:
    FILES_TO_SCAN_PATH: '<string>'
    # SCAN_EXTRA_ARGS: '<array>' # Optional.
    # CONFIG_PATH: '<string>' # Optional.
    # CREATE_REPORT: "<boolean>" # Optional. Default: `true`
    # FAIL_ON: "<integer>" # Optional.
    # DEBUG: "<boolean>" # Optional. Default: `false`

Variables

VariableUsage
FILES_TO_SCAN_PATH (*)Files or directories to scan , separated. Example: "./path_to_dir,path_to_file.txt".
SCAN_EXTRA_ARGSAdditional options to pass to the KICS scan commands. If -p argument is passed, it will extend the files or directories provided in FILES_TO_SCAN_PATH variable. If --config argument is passed, it will be ignored in favour of the CONFIG_PATH variable.
CONFIG_PATHPath to KICS configuration file. Alternative to SCAN_EXTRA_ARGS variable. If path keyword is provided inside config file, it will be ignored in favour of the FILES_TO_SCAN_PATH variable.
CREATE_REPORTControls whether the pipe will create Bitbucket CodeInsights reports using the results of the KICS execution. Default: true.
FAIL_ONThe threshold value of the KICS scanner's [result status code][result status code] at which the pipe should trigger a failure.
DEBUGTurn on extra debug information. Default: false.

(*) = required variable.

Additional options

If necessary, users can enhance their scans by incorporating options from the Scan command with the SCAN_EXTRA_ARGS variable.

Additionally, there's an option for users to create and provide a custom KICS configuration file, which is applied in the bitbucket-iac-scan pipe through the CONFIG_PATH variable. This configuration file serves as an alternative to using SCAN_EXTRA_ARGS. Upon creating a custom KICS config, it should be stored within the user's repository. This is where the pipeline with a bitbucket-iac-scan pipe will be triggered.

If both SCAN_EXTRA_ARGS and CONFIG_PATH variables are provided with duplicated arguments, then arguments from SCAN_EXTRA_ARGS variable will have a higher precedence.

Examples

Basic examples:

root@kitploit:~
script:
  - pipe: atlassian/bitbucket-iac-scan:0.5.2
    variables:
      FILES_TO_SCAN_PATH: ./my_files_to_scan_dir

Scan the sources and pipe should fail if the KICS scanner's [result status code][result status code] is more than or equal to provided threshold value.

root@kitploit:~
script:
  - pipe: atlassian/bitbucket-iac-scan:0.5.2
    variables:
      FILES_TO_SCAN_PATH: ./my_files_to_scan_dir
      FAIL_ON: 40

Advanced examples:

Example with kics config that can be used in the pipe:

kics-config.json. The path key will be ignored

root@kitploit:~
{
  "path": "assets/iac_samples",
  "verbose": true,
  "log-file": true,
  "type": "Dockerfile,Kubernetes",
  "queries-path": "assets/queries",
  "exclude-paths": [
     "foo/",
     "bar/"
  ],
  "output-path": "results"
}
root@kitploit:~
script:
  - pipe: atlassian/bitbucket-iac-scan:0.5.2
    variables:
      FILES_TO_SCAN_PATH: ./my_files_to_scan_dir
      CONFIG_PATH: kics-config.json

Example with scan options:

root@kitploit:~
script:
  - pipe: atlassian/bitbucket-iac-scan:0.5.2
    variables:
      FILES_TO_SCAN_PATH: ./my_files_to_scan_dir
      SCAN_EXTRA_ARGS:
        - "--disable-secrets"
        - "--type=Dockerfile"

Do not create a CodeInsights report:

root@kitploit:~
script:
  - pipe: atlassian/bitbucket-iac-scan:0.5.2
    variables:
      FILES_TO_SCAN_PATH: ./my_files_to_scan_dir
      CREATE_REPORT: 'false'

Support

If you’d like help with this pipe, or you have an issue or feature request, let us know on Community.

If you’re reporting an issue, please include:

  • the version of the pipe
  • relevant logs and error messages
  • steps to reproduce

License

Copyright (c) 2024 Atlassian and others. Apache 2.0 licensed, see LICENSE.txt file.

Download Tool