n8n/packages/nodes-base/nodes/N8n/AuditDescription.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
1.6 KiB
TypeScript
Raw Normal View History

feat(core): Security audit (#5034) * :sparkles: Implement security audit * :zap: Use logger * :test_tube: Fix test * :zap: Switch logger with stdout * :art: Set new logo * :zap: Fill out Public API schema * :pencil2: Fix typo * :zap: Break dependency cycle * :zap: Add security settings values * :test_tube: Test security settings * :zap: Add publicly accessible instance warning * :zap: Add metric to CLI command * :pencil2: Fix typo * :fire: Remove unneeded path alias * :blue_book: Add type import * :fire: Remove inferrable output type * :zap: Set description at correct level * :zap: Rename constant for consistency * :zap: Sort URLs * :zap: Rename local var * :zap: Shorten name * :pencil2: Improve phrasing * :zap: Improve naming * :zap: Fix casing * :pencil2: Add docline * :pencil2: Relocate comment * :zap: Add singular/plurals * :fire: Remove unneeded await * :pencil2: Improve test description * :zap: Optimize with sets * :zap: Adjust post master merge * :pencil2: Improve naming * :zap: Adjust in spy * :test_tube: Fix outdated instance test * :test_tube: Make diagnostics check consistent * :zap: Refactor `getAllExistingCreds` * :zap: Create helper `getNodeTypes` * :bug: Fix `InternalHooksManager` call * :truck: Rename `execution` to `nodes` risk * :zap: Add options to CLI command * :zap: Make days configurable * :revert: Undo changes to `BaseCommand` * :zap: Improve CLI command UX * :zap: Change no-report return value Empty array to trigger empty state on FE. * :zap: Add empty check to `reportInstanceRisk` * :test_tube: Extend Jest `expect` * :blue_book: Augment `jest.Matchers` * :test_tube: Set extend as setup file * :wrench: Override lint rule for `.d.ts` * :zap: Use new matcher * :zap: Update check * :blue_book: Improve typings * :zap: Adjust instance risk check * :pencil2: Rename `execution` → `nodes` in Public API schema * :pencil2: Add clarifying comment * :pencil2: Fix typo * :zap: Validate categories in CLI command * :pencil2: Improve naming * :pencil2: Make audit reference consistent * :blue_book: Fix typing * :zap: Use `finally` in CLI command
2023-01-05 04:28:40 -08:00
import type { INodeProperties } from 'n8n-workflow';
export const auditOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
default: 'get',
displayOptions: {
show: {
resource: ['audit'],
},
},
options: [
{
name: 'Generate',
value: 'generate',
action: 'Generate a security audit',
description: 'Generate a security audit for this n8n instance',
routing: {
request: {
method: 'POST',
url: '/audit',
},
},
},
],
},
];
export const auditFields: INodeProperties[] = [
{
displayName: 'Additional Options',
name: 'additionalOptions',
type: 'collection',
placeholder: 'Add Filter',
displayOptions: {
show: {
resource: ['audit'],
},
},
routing: {
request: {
body: {
additionalOptions: '={{ $value }}',
},
},
},
default: {},
options: [
{
displayName: 'Categories',
name: 'categories',
description: 'Risk categories to include in the audit',
type: 'multiOptions',
default: [],
options: [
{
name: 'Credentials',
value: 'credentials',
},
{
name: 'Database',
value: 'database',
},
{
name: 'Filesystem',
value: 'filesystem',
},
{
name: 'Instance',
value: 'instance',
},
{
name: 'Nodes',
value: 'nodes',
},
],
},
{
displayName: 'Days Abandoned Workflow',
name: 'daysAbandonedWorkflow',
description: 'Days for a workflow to be considered abandoned if not executed',
type: 'number',
default: 90,
},
],
},
];