Getting started with Checks Code Compliance

  • Checks Code Compliance is currently in Public Preview and can be used to scan your codebase for sensitive data handling, utilizing the Checks CLI to upload results to the Checks Console.

  • Your codebase is not stored on Google servers; only short code snippets related to findings are stored if enabled.

  • Scan results can be exported in various formats (text, JSON, HTML) using the checks code scan command with specified flags.

  • Automated scans can be integrated into your CI/CD pipeline by referring to the CI/CD Overview documentation.

  • For support or assistance, reach out to checks-support@google.com.

Code Compliance is used through the Checks CLI and results are uploaded to the Checks Console.

Install Code Compliance

To get started, follow the installation instructions for the Checks CLI.

Once installed, you'll be able to run Code Compliance commands:

checks code <command>

Scan your project

After installing Checks Code Compliance, you can scan your codebase to understand how sensitive data is collected, shared, or processed.

To scan your repository code using the Code Compliance CLI, use the checks code scan command.

For example, to test the my-swift-app repository that's in the folder repositories/personal:

checks code scan repositories/personal/my-swift-app

By default, Code Compliance will output results to a text format in the terminal.

Output test results in JSON format

To export the results to a JSON format in the terminal:

checks code scan PATH --format=json > ./checks-code-results

To export the results to a JSON format and save to a local file:

checks code scan PATH --format=json > ./checks-code-results.json

Output test results in HTML format

To export the results to a HTML format in the terminal:

checks code scan PATH --format=html > ./checks-code-results

To export the results to a HTML format and save to a local file:

checks code scan PATH --format=html > ./checks-code-results.html

Additional help

Run checks code scan --help.

Set up automated scans

See our CI/CD Overview documentation for setting up automated Code Compliance scans.

Getting support

Send an email to checks-support@google.com whenever you need help with Checks Code Compliance, or Checks in general.