Update a Sensor Profile

Use this API to update a sensor profile in your account.

PUT/csapi/v1.3/sensorProfile/{sensorProfileId}

Input ParametersInput Parameters

Parameter Mandatory/Optional Data Type Description
sensorProfileId Mandatory string The ID/UUID for the sensor profile to update.
Request body Mandatory - Provide parameter values as explained in the Request Body Parameters section below.
isVulnPropagation Mandatory string Apply vulnerability propagation to the sensor profile.
Valid values: true or false

Request Body ParametersRequest Body Parameters

Parameter Mandatory/Optional Data Type Description
profileName Mandatory string Specify a title for your sensor profile.
description Optional string Specify a description for your sensor profile.
profileType Mandatory string Specify the type of sensor profile.
Valid values: Registry, General, CICD, Cluster, or RUNTIME.

The default value is General.

associatedRegistryIds Mandatory string Add one or more registries to the registry sensor profile by specifying the registry IDs.

These are the registries that will be scanned by the sensors in the same profile.

associatedSensorIds Mandatory  string Add one or more sensors to this profile by specifying the sensor IDs.
runtimeSensor
     
Mandatory string Appplicable only with RUNTIME profileType.

Use it to send the Container Runtime Sensor (CRS) events to the Qualys Cloud Platform.
Valid values: enable or disable

If you mention 'disable', the CRS events data is not sent to the Qualys Cloud platform.

Default value: enable

ignoreProcesses Optional string Appplicable only with RUNTIME profileType.

Specify the processes to be exluded.

You can mention absolute path or binary name.

Example: /usr/bin/cat (absolute path) or
/cat (binary name)

filter - string
config weeklyBlackoutWindowSchedules startTime  - string Configure a window of time in which the sensors in your profile will not operate.
endTime  - string
repeatOnDays  - string
vulnerabilityManagement containerScanningInterval - integer Select a scanning interval for how often sensors should rescan containers.

Valid interval values are: 12, 24, and 48.

An interval of 48 hours is recommended for optimum performance.

imageExclusionRegexList - string Create an image exclusion list using regular expressions.

Images matching the exclusion list are not scanned by the sensors in this profile.

globalScanningFlag - Boolean  Turn on or off all the scan operations.
scanningPolicy - string Specify one of the following policies:
  • DynamicWithStaticScanningAsFallback: Performs dynamic scanning

  • Dynamic: Performs static scanning as a fallback to dynamic scanning for images without a shell.

performanceManagement maxNoOfArchivedLogFiles  - integer Specify the maximum number of log files to achieve. The remaining files will be purged.
maxLogFileSize - integer Specify the maximum file size for each log file. After the file size is achieved for a file, a new file is created.
logSecurityLevel  - string  Specifies the type of log data to be logged.

SampleSample

API Request - General Sensor Profile

    curl -X 'PUT' \
  '<qualys_base_url>/csapi/v1.3/sensorProfile/a68e5092-70ad-426d-ace5-3933de8971bb' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "profileName": "check_update_123",
  "profileType": "General",
  "description": "test1_update123",
  "createdBy": "john_doe",
  "updatedBy": "john_doe",
  "config": {
    "performanceManagement": {
      "logSecurityLevel": "INFORMATION",
      "maxNoOfArchivedLogFiles": 1,
      "maxLogFileSize": 3
    },
    "vulnerabilityManagement": {
      "containerScanningInterval": 0,
      "imageExclusionRegexList": [
        "string"
      ],
    },
      "globalScanningFlag": true,
      "scanningPolicy": "DynamicWithStaticScanningAsFallback"
    },
    "performanceManagement": {
      "maxNoOfArchivedLogFiles": 0,
      "maxLogFileSize": 0,
      "logSecurityLevel": "INFORMATION"
    }
  },
  "associatedSensorIds": [
    "096d96b4-c252-4c5b-835d-462109e5a8b0"
  ]
  "isVulnPropagation": true,
  "awsFargateVulnPropagationConfig": {}
}
}'
    

Request Body - General Sensor Profile

    {
    "profileId": "6963d471-7598-4d4d-b95c-e540c75745b2",
    "profileName": "General-test2",
    "profileType": "General",
    "description": "",
    "createdBy": "test_zp53",
    "created": "1669108423070",
    "updatedBy": null,
    "updated": "1669111816485",
    "config": {
        "weeklyInactiveWindowSchedules": [
            {
                "repeatOnDays": [
                    "SUNDAY"
                ],
                "allDayToggle": false,
                "startTime": "01:15",
                "endTime": "03:00"
            }
        ],
        "vulnerabilityManagement": {
            "globalScanningFlag": true,
            "scanningPolicy": "DynamicWithStaticScanningAsFallback",
            "containerScanningInterval": 48,
            "imageExclusionRegexList": []
        },
        "performanceManagement": {
            "maxNoOfArchivedLogFiles": 5,
            "maxLogFileSize": 10,
            "logSecurityLevel": "INFORMATION"
        }
    },
    "associatedSensorIds": [
        "f1edef37-8d72-4f5d-87ed-9d6da981cffe"
    ],
    "associatedRegistryIds": null
    }
    

API Request - Runtime Sensor Profile

     curl -X 'PUT' \
  '<qualys_base_url>/csapi/v1.3/sensorProfile/a68e5092-70ad-426d-ace5-3933de8971bb' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "profileName": "check_update_123",
  "profileType": "Runtime",
  "description": "test1_update123",
  "createdBy": "john_doe",
  "updatedBy": "john_doe",
  "config": {
    "performanceManagement": {
      "logSecurityLevel": "DEBUG",
      "maxNoOfArchivedLogFiles": 1,
      "maxLogFileSize": 1
    },
    "runtimeSensor": "disable",
    "ignoreProcesses": [
      "test123",
      "/usr/bin/cat"
    ]
  },
  "associatedSensorIds": [
    "39e19424-ebb3-457b-b037-658d3bb3b1ec"
  ]
}
    

Response

    {
  "profileUuid": "a68e5092-70ad-426d-ace5-3933de8971bb"
}