UNPKG

n8n-nodes-tenable-community

Version:

n8n node for the Tenable One platform

251 lines (250 loc) 7.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.vulnerabilityManagementFields = exports.paginableOperations = exports.operationOptions = exports.resourceOptions = void 0; exports.resourceOptions = [ { name: 'Asset', value: 'assets', }, // Future resources like 'vulnerabilities', 'scans' can be added here ]; exports.operationOptions = { assets: [ { name: 'List Assets', value: 'listAssets', action: 'List assets', description: 'Retrieve a list of assets', }, { name: 'Get Asset Details', value: 'getAssetDetails', action: 'Get asset details', description: 'Retrieve detailed information for a specific asset', }, { name: 'Import Assets', value: 'importAssets', action: 'Import assets', description: 'Import assets from a source', }, { name: 'List Asset Import Jobs', value: 'listAssetImportJobs', action: 'List asset import jobs', description: 'Retrieve a list of asset import jobs', }, { name: 'Get Import Job Status', value: 'getImportJobStatus', action: 'Get import job status', description: 'Get the status of a specific asset import job', }, { name: 'Bulk Update ACR', value: 'bulkUpdateAcr', action: 'Update ACR for multiple assets', description: 'Perform a bulk update of Asset Criticality Rating (ACR)', }, { name: 'Move Assets', value: 'moveAssets', action: 'Move assets between networks', description: 'Move assets from a source network to a destination network', }, { name: 'Bulk Delete Assets', value: 'bulkDeleteAssets', action: 'Bulk delete assets', description: 'Delete multiple assets based on a query', }, ], }; exports.paginableOperations = [ 'listAssets', 'listAssetImportJobs', ]; exports.vulnerabilityManagementFields = [ // Asset Fields { displayName: 'Asset UUID', name: 'assetUuid', type: 'string', default: '', required: true, displayOptions: { show: { resource: ['assets'], operation: ['getAssetDetails'], }, }, description: 'The unique identifier of the asset to retrieve', }, { displayName: 'Assets', name: 'assets', type: 'json', typeOptions: { rows: 5, }, default: '[\n {\n "fqdn": "host.example.com",\n "ipv4": "192.0.2.1"\n }\n]', required: true, displayOptions: { show: { resource: ['assets'], operation: ['importAssets'], }, }, description: 'A JSON array of asset objects to import', }, { displayName: 'Source', name: 'source', type: 'string', default: '', required: true, displayOptions: { show: { resource: ['assets'], operation: ['importAssets', 'moveAssets'], }, }, description: 'The source from which assets are being imported or moved', }, { displayName: 'Asset Import Job UUID', name: 'assetImportJobUuid', type: 'string', default: '', required: true, displayOptions: { show: { resource: ['assets'], operation: ['getImportJobStatus'], }, }, description: 'The unique identifier of the asset import job', }, { displayName: 'ACR Score', name: 'acrScore', type: 'number', default: 1, required: true, typeOptions: { minValue: 1, maxValue: 10, }, displayOptions: { show: { resource: ['assets'], operation: ['bulkUpdateAcr'], }, }, description: 'The Asset Criticality Rating (ACR) score to assign', }, { displayName: 'Reason', name: 'reason', type: 'multiOptions', options: [ { name: 'Business Critical', value: 'Business Critical' }, { name: 'Dev Only', value: 'Dev only' }, { name: 'Existing Mitigation Control', value: 'Existing Mitigation Control' }, { name: 'In Scope For Compliance', value: 'In Scope For Compliance' }, { name: 'Key Drivers Does Not Match', value: 'Key drivers does not match' }, { name: 'Other', value: 'Other' }, ], default: [], required: true, displayOptions: { show: { resource: ['assets'], operation: ['bulkUpdateAcr'], }, }, description: 'The reason for the ACR update', }, { displayName: 'Note', name: 'note', type: 'string', default: '', displayOptions: { show: { resource: ['assets'], operation: ['bulkUpdateAcr'], }, }, description: 'An optional note for the ACR update', }, { displayName: 'Asset', name: 'asset', type: 'json', default: '{\n "has_agent": false,\n "ipv4": [\n "192.0.2.1"\n ]\n}', required: true, displayOptions: { show: { resource: ['assets'], operation: ['bulkUpdateAcr'], }, }, description: 'A JSON object defining the assets to be updated', }, { displayName: 'Destination', name: 'destination', type: 'string', default: '', required: true, displayOptions: { show: { resource: ['assets'], operation: ['moveAssets'], }, }, description: 'The destination network for the assets', }, { displayName: 'Targets', name: 'targets', type: 'string', default: '', required: true, displayOptions: { show: { resource: ['assets'], operation: ['moveAssets'], }, }, description: 'A comma-separated list of asset UUIDs to move', }, { displayName: 'Query', name: 'query', type: 'json', default: '{\n "field": "ipv4",\n "operator": "eq",\n "value": "192.0.2.0/24"\n}', required: true, displayOptions: { show: { resource: ['assets'], operation: ['bulkDeleteAssets'], }, }, description: 'A JSON object defining the query to select assets for deletion', }, { displayName: 'Hard Delete', name: 'hardDelete', type: 'boolean', default: false, displayOptions: { show: { resource: ['assets'], operation: ['bulkDeleteAssets'], }, }, description: 'Whether to permanently delete the assets. If false, assets are moved to the trash.', }, ];