Run Impact Assessment
This is a guide to running an impact analysis assessment for Fabric components.
An Impact Assessment can be run for the following reasons:
- To identify resources that will be impacted by making a change to a selected resource (e.g. finding the Agents, Connection, and Skills that are impacted by changing a Secret).
- To identify the potential impact before deleting a resource (Finding which Agents will be impacted by deleting a Skill).
Preparing query
Get a list of the types of resources by running:
cortex assessments list-types
Current types include:
- Cohort
- ProfileSchema
- Group
- Attribute
- Goal
- KPI
- Mission
- Action
- Skill
- Secret
- Connection
- DataSource
- Intervention
- SimulatedAttribute
- Condition
- Type
You may want to filter your assessment resource query by one or more of these resource types.
Get a list of resources by running:
cortex assessments list-resources
This command returns a large number of records so you may filter by one or more of the following:
--scope projectA, projectB
- list projects--name componentName
- Cortex component name--type resourceType
- Resource type (see list above)--skip number-of-records-to-skip
- Skip/exclude some number of records from the response--limit number-of-records-to-return
- Limit results to a some number of records (applied after --skip)--missing
- Provide a list of missing dependencies for an existing or to be created resourceExample A: Limits
cortex assessments list-resources --name aws --type Secret --limit 5
Response
┌───────────────┬─────────────────┬──────────┬─────────────────┐
│ Name │ Title │ Type │ Project │
├───────────────┼─────────────────┼──────────┼─────────────────┤
│ awssecretkey │ AWS secret key │ Secret │ hw-campaign-… │
├───────────────┼─────────────────┼──────────┼─────────────────┤
│ awspublickey │ AWS public key │ Secret │ hw-campaign-… │
├───────────────┼─────────────────┼──────────┼─────────────────┤
│ lierSecretKey │ Lier Secret Key │ Secret │ lier-demo-06… │
└───────────────┴─────────────────┴──────────┴─────────────────┘Example B: Missing
cortex assessments dependency-tree --name campaignName --scope myProject --type Campaign --missing
Response
┌────────────┬────────────┬───────────────┐
│ Name │ Title │ Resource Type │
├────────────┼────────────┼───────────────┤
│ aws-secret │ aws-secret │ Secret │
├────────────┼────────────┼───────────────┤
│ newsecret │ newsecret │ Secret │
└────────────┴────────────┴───────────────┘
Create an assessment by specifying the resource you wish to trace.
cortex assessments create [options] [assessmentDefinition]
Options
--component componentName
- Cortex component name--description "description"
- Assessment description (assessment metadata)--name AssessmentName
- Assessment name (assessment metadata)--scope projectA, projectB
- Assessment scope projects (comma separated values)--title assessmentTitle
- Assessment title (assessment metadata)--type componentTypes
- Response scoped to specified component types (comma separated values)Example
The example below requests an assessment for all of the components that are dependent upon a component named "awssecretkey". The assessment is named "ia2". The name is required to create and download an assessment report.
cortex assessments create --name ia2 --component awssecretkey
Response
Assessment ia2 saved successfully
Get a list of Assessments
cortex assessments list --limit 2
Response
┌───────┬───────┬──────────────┬──────────┬────────────┬───────────────┬──────────────┐
│ Name │ Title │ Description │ Projects │ # Reports │ Created │ Created By │
├───────┼───────┼──────────────┼──────────┼────────────┼───────────────┼──────────────┤
│ ia2 │ - │ - │ - │ 0 │ 5 seconds ago │ cortex@ex.com│
├───────┼───────┼──────────────┼──────────┼────────────┼───────────────┼──────────────┤
│ ia1 │ - │ - │ - │ 0 │ a minute ago │ cortex@ex.com│
└───────┴───────┴──────────────┴──────────┴────────────┴───────────────┴──────────────┘Create an assessment report (for the assessment named "ia2").
cortex assessments report ia2
Response
{
"reportId": "awssecretkey_1624541349590"
}Get a list of assessment reports (for the assessment named "ia2").
cortex assessments report-list ia2
Response
┌─────────────────┬─────────────────┬──────────────────────┬───────────────────┬────────────────────┐
│ Assessment Name │ Report Id │ Impact Summary │ Created │ Created By │
├─────────────────┼─────────────────┼──────────────────────┼───────────────────┼────────────────────┤
│ ia2 │ awssecretkey_16 │ {"Agent":1,"Skill":2}│ a few seconds ago │ cortex@example.com │
└─────────────────┴─────────────────┴──────────────────────┴───────────────────┴────────────────────┘View assessment report details (for the assessment named "ia2" and with the report id "awssecretkey_162 ). These are the resources that are affected by changes to a component named "awssecretkey".
cortex assessments report-get ia1 "awssecretkey_16"
Response
┌───────────────────────────┬──────────────────────────────┬─────────────┬─────────────────────────┐
│ Name │ Title │ Type │ Project │
├───────────────────────────┼──────────────────────────────┼─────────────┼─────────────────────────┤
│ mission-agent-11e84 │ mission-agent-11e84 │ Agent │ hw-campaign-im-48fac │
├───────────────────────────┼──────────────────────────────┼─────────────┼─────────────────────────┤
│ hw/skill-router │ hw/skill-router │ Skill │ hw-campaign-im-48fac │
├───────────────────────────┼──────────────────────────────┼─────────────┼─────────────────────────┤
│ domain-contract-executor │ domain-contract-executor │ Skill │ hw-campaign-im-48fac │
└───────────────────────────┴──────────────────────────────┴─────────────┴─────────────────────────┘(Optional) Export the assessment report as a .csv file.
cortex assessments report-export ia2 awssecretkey_162
Response
Report exported to awssecretkey_162.csv
Query matching multiple resources
You may create and run a query with more than one resource specified that returns all components that match for both resources.
Example
cortex assessments create --name daemonReportTest1 --title testfab2381 --scope sreddy --type skill --component daemon
Query that returns a dependency tree
You may run a query that returns the dependency tree for the specified resource.
Run the CLI command:
Example
cortex assessments dependency-tree --name secure-skill --scope vpandya-26f8a --type Skill
Example CLI Response
┌───────────────┬───────────────┬───────────────┐
│ Name │ Title │ Resource Type │
├───────────────┼───────────────┼───────────────┤
│ secure_job │ secure_job │ Action │
├───────────────┼───────────────┼───────────────┤
│ nested/secret │ nested/secret │ Secret │
└───────────────┴───────────────┴───────────────┘
View Assessment report in Console
- Log in to Fabric Console.
- Click Assessments in the left menu.
- A list of Impact Assessment reports is displayed with the following details:
- Assessment Name: Unique system name (based on the resource name) assigned to the assessment during creation
- Assessment Title: Human-readable title assigned to the assessment during creation
- Generated On: Created date-timestamp
- Number of Reports: Number of reports generated for the resource
- Scope of Assessment: Project scope of the assessment
- Click the assessment name to view a list of reports (as cards).
- Or click Run New Report (a new report with the same configuration is run).
- To view the new report click back to the Assessment list and click the new report (card).
- Click the report card to view potentially impacted resources (cards).
- Click View All at the end of each resource-type row to see additional impacted resources of that type in a list view.
- Click View All Impacts at the top right to view all impacted resources of all types in a list view.
- Click Export to CSV to download a the report in a .csv file.
- You can opt to export a list of all impacted resources or you can select just the resource-types you want in the report.
Assessment Reports in Console
Assessment List
List Columns:
- Assessment name: System-name for the Assessment
- Assessment title: Human-readable name for the Assessment
- Generate on: Timestamp when the Impact Assessment query was run
- Number of reports: The number report that have been generated for the configured assessment query
- Scope: Projects to query for assessment reports
Actions:
- Open Report: Click the Assessment item row to open the report
- Copy link: Click the end-row menu command to copy the link to the report in the Console so you can send it to a collaborator
- Delete Assessment: Click the end-row menu command to delete the report
Reports list
Reports are presented as cards.
Click a report card to open a detail view of the report.
Report Details
Report details may be displayed as cards or in a list view.
To display a list view of affected components by component type, click View All at the end of the component type row.
To display a list view of all components affected, click View All Impacts at the top right.
You may download a report of all affected components by clicking the Export to CSV button at the top right.