Skip to content

Commit

Permalink
Update USAGE-CAPEC.md
Browse files Browse the repository at this point in the history
fixed text about allow_changes
  • Loading branch information
rpiazza authored Mar 6, 2018
1 parent 613e82a commit e5163a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion USAGE-CAPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ from stix2 import FileSystemStore
fs = FileSystemStore('./CAPEC', allow_custom=True)
```

As of this writing, `allow_custom` must be set to `True`. This is because the CAPEC data uses several custom properties which are not part of the STIX 2.0 specification (`x_capec_prerequisites`, `x_capec_example_instances`, etc).

To perform a query, we must define a [Filter](http://stix2.readthedocs.io/en/latest/guide/datastore.html#Filters). As of this writing, a filter must, at a minimum, specify object `id`'s or an object `type`. The following filter can be used to retrieve all CAPEC attack patterns:

```python
Expand Down Expand Up @@ -96,4 +98,4 @@ def get_mitigations_by_attack_pattern(src, ap_stix_id):

ap = get_attack_pattern_by_capec_id(fs, '66')[0]
get_mitigations_by_attack_pattern(fs, ap.id)
```
```

0 comments on commit e5163a5

Please sign in to comment.