Skip to content

Corrective Actions ​

Manage corrective actions with the de.iterate SDK.

Overview ​

The correctiveActions resource provides operations for tracking remediation activities linked to findings and audits.

List Corrective Actions ​

typescript
// List all
const actions = await client.correctiveActions.list();

// Filter by finding
const forFinding = await client.correctiveActions.list({
  findingId: 'FND-001'
});

Get Corrective Action ​

typescript
const action = await client.correctiveActions.get('CA-001');

console.log(action.title);
console.log(action.status);
console.log(action.dueDate);

Create Corrective Action ​

typescript
const action = await client.correctiveActions.create({
  title: 'Implement MFA',
  description: 'Deploy multi-factor authentication for all user accounts',
  assignee: 'it-team@company.com',
  dueDate: '2025-03-01',
  findingId: 'FND-001',
  linkedDocuments: ['DOC-MFA-PLAN'],
});

console.log(`Created: ${action.id}`);

CreateCorrectiveActionInput ​

FieldTypeRequiredDescription
titlestring✅Action title
descriptionstring❌Detailed description
statusstring❌Current status
assigneestring❌Assigned to
dueDatestring❌Due date
findingIdstring | null❌Related finding
auditIdstring | null❌Related audit
linkedDocumentsstring[]❌Evidence documents

Update Corrective Action ​

typescript
await client.correctiveActions.update('CA-001', {
  status: 'completed',
  description: 'MFA deployed to all 250 user accounts',
});

Delete Corrective Action ​

typescript
await client.correctiveActions.delete('CA-001');
typescript
// Link
await client.correctiveActions.linkToFinding('CA-001', 'FND-002');

// Unlink
await client.correctiveActions.unlinkFromFinding('CA-001');

CorrectiveAction Type ​

typescript
interface CorrectiveAction {
  id: string;
  title: string;
  description?: string;
  status?: string;
  assignee?: string;
  dueDate?: string;
  findingId?: string | null;
  auditId?: string | null;
  linkedDocuments?: string[];
  tenantId?: string;
  createdBy?: string;
  createdAt?: string;
  updatedAt?: string;
}

Examples ​

Overdue Actions Report ​

typescript
async function overdueActionsReport() {
  const actions = await client.correctiveActions.list();
  const now = new Date();
  
  const overdue = actions.filter(a => {
    if (!a.dueDate || a.status === 'completed') return false;
    return new Date(a.dueDate) < now;
  });
  
  console.log(`Overdue Corrective Actions: ${overdue.length}`);
  for (const action of overdue) {
    console.log(`  • ${action.title}`);
    console.log(`    Due: ${action.dueDate}`);
    console.log(`    Assignee: ${action.assignee || 'Unassigned'}`);
  }
}

Next Steps ​

Released under the MIT License.