Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions nodes/DependencyAnalytics/DependencyAnalytics.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ export class DependencyAnalytics implements INodeType {
outputs: [NodeConnectionType.Main],
usableAsTool: true,
credentials: credentials,
requestDefaults: {
baseURL: 'https://rhtpa.stage.redhat.com/api/v2/',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
},

properties,
};
Expand Down
1 change: 1 addition & 0 deletions nodes/DependencyAnalytics/DependencyAnalytics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ test('It contains all expected displayNames in properties', () => {
'Base URL',
'Resource',
'Identifier',
'Identifier',
'Limit',
'Output',
'Selected Fields',
Expand Down
2 changes: 1 addition & 1 deletion nodes/DependencyAnalytics/actions/advisory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { shapeOutput } from '../utils/output';
export async function get({ ctx, itemIndex }: { ctx: IExecuteFunctions; itemIndex: number }) {
const credentialName = chooseCredential(ctx, itemIndex);
const base = getBase(ctx, itemIndex);
const identifierRaw = (ctx.getNodeParameter('identifier', itemIndex, '') as string).trim();
const identifierRaw = (ctx.getNodeParameter('identifierSha', itemIndex, '') as string).trim();
if (!identifierRaw)
throwError(ctx.getNode(), "The 'Identifier' parameter is required.", itemIndex);

Expand Down
2 changes: 1 addition & 1 deletion nodes/DependencyAnalytics/actions/sbom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { shapeOutput } from '../utils/output';
export async function get({ ctx, itemIndex }: { ctx: IExecuteFunctions; itemIndex: number }) {
const credentialName = chooseCredential(ctx, itemIndex);
const base = getBase(ctx, itemIndex);
const identifierRaw = (ctx.getNodeParameter('identifier', itemIndex, '') as string).trim();
const identifierRaw = (ctx.getNodeParameter('identifierSha', itemIndex, '') as string).trim();
if (!identifierRaw)
throwError(ctx.getNode(), "The 'Identifier' parameter is required.", itemIndex);

Expand Down
2 changes: 1 addition & 1 deletion nodes/DependencyAnalytics/actions/vulnerability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shapeOutput } from '../utils/output';
export async function get({ ctx, itemIndex }: { ctx: IExecuteFunctions; itemIndex: number }) {
const credentialName = chooseCredential(ctx, itemIndex);
const base = getBase(ctx, itemIndex);
const identifierRaw = (ctx.getNodeParameter('identifier', itemIndex, '') as string).trim();
const identifierRaw = (ctx.getNodeParameter('identifierCve', itemIndex, '') as string).trim();
if (!identifierRaw)
throwError(ctx.getNode(), "The 'Identifier' parameter is required.", itemIndex);

Expand Down
18 changes: 15 additions & 3 deletions nodes/DependencyAnalytics/descriptions/common.properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,26 @@ export const commonProperties: INodeProperties[] = [
// common “get” param
{
displayName: 'Identifier',
name: 'identifier',
name: 'identifierCve',
type: 'string',
required: true,
default: '',
description: 'Vulnerability identifier (CVE)',
placeholder: 'e.g. CVE-2024-1234',
displayOptions: {
show: { operation: ['get'], resource: ['vulnerability'] },
},
},
{
displayName: 'Identifier',
name: 'identifierSha',
type: 'string',
required: true,
default: '',
description: 'SHA ID (sha256|sha384|sha512) or a normalized identifier',
placeholder: 'e.g. sha256:3a7bd3e2360a3d…, CVE-2024-1234',
placeholder: 'e.g. sha256:3a7bd3…, sha384:…, or sha512:…',
displayOptions: {
show: { operation: ['get'], resource: ['sbom', 'vulnerability', 'advisory'] },
show: { operation: ['get'], resource: ['sbom', 'advisory'] },
},
},

Expand Down