The ShiftLeft JSON File

The ShiftLeft JSON file (named shiftleft.json) is generated by Inspect after it has analyzed your code.

The JSON file contains configuration information that Protect's Microagent uses to customize the monitoring and securing of your application. You can find the file in the directory from which you run Inspect.

If you run Inspect as a separate step from Protect, you must pass shiftleft.json from Inspect to the Microagent. By default, the Microagent expects the file to be in the directory from which you run Inspect. If this is not the case, you will need to either:

  • Copy shiftleft.json to the working directory

  • Set up an environment variable (e.g., SHIFTLEFT_CONFIG) to pass to Microagent the path where shiftleft.json can be found

Parameters

The shiftleft.json includes two parameters that are required by the Microagent:

Parameter

Description

accessToken

The access token that authorizes the Microagent to use ShiftLeft services

sprId

The identifier for your application's Security Profile for Runtime (SPR)

{
"accessToken": "${access-token-string}",
"sprId": "${sprd-id}"
}

The sprId Parameter

The shiftleft.json includes a parameter called sprId, which identifies each analysis performed by Inspect.

The sprId is a string that is comprised of three parts:

  • Your organization ID

  • Your application name

  • A unique version hash

"sl/418...b7a/myApp/f0e...e16"

Please note that if you re-analyze your application after you change your code, you will have a new sprId. Whenever this happens, restart the JVM of your application with the Microagent (make sure the Microagent has access to and is using the most recent shiftleft.json file).

Modifying the ShiftLeft JSON File

You can configure the Microagent by configuring the ShiftLeft JSON file.

For example, you can configure your proxy and your logging levels as follows:

{
"accessToken": "ey...",
"sprId": "sl/418...b7a/myApp/f0e...e16",
"slProxy": {
"host": "10.8.8.10",
"port": 443,
"certificate": "*"
},
"log": {
"level": "TRACE",
"maxFiles": 5,
"maxFileBytes": 10000000
}
}

See How to Configure the Protect Microagent for information about additional configuration options.