Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix Auto generation of Readme #7

Merged
merged 2 commits into from
Jan 4, 2024
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
all:
@./tools/gendoc.sh
@./scripts/gendoc.sh
99 changes: 56 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,80 @@
<!-- THIS IS AN AUTO-GENERATED FILE by ./tools/gendoc.sh. DO NOT EDIT MANUALLY -->
<!-- THIS IS AN AUTO-GENERATED FILE by ./scripts/gendoc.sh. DO NOT EDIT MANUALLY -->

# Security Intents for Intent Driven Security

![CI status](https://github.com/5GSEC/security-intents/actions/workflows/ci-verify.yml/badge.svg)

Repository to hold Security Intents in standard template format.

![](res/nimbus.png)

## Security Intents
- [blockAsset](intents/core/blockAsset.yaml)
- [blockRawSocket](intents/core/blockRawSocket.yaml)
- [protectAsset](intents/core/protectAsset.yaml)
- [protectPort](intents/core/protectPort.yaml)

## Security Threat Template
```
title: # Scenario-title
description: # Detailed description of the scenario
severity: # High/Medium/Low
tags: [oran, 5gcore, generic, oranThreatId]
detectionMethods: #Mechanisms to detect the threat - https://fight.mitre.org/data%20sources
- name: applicationlog
tag: [mitre, ds0015]
description: desc
url: https://fight.mitre.org/data%20sources/DS0015
- name: myapplicationlog
tag: [accuknox, ax0015]
description: desc
url: https://...
mitigationMethods: #Mechanisms to mitigate the threat - https://fight.mitre.org/mitigations
- name: applicationlog
tag: [mitre, ds0015]
description: desc
url: https://fight.mitre.org/data%20sources/DS0015
- name: myapplicationlog
tag: [accuknox, ax0015]
description: desc
url: https://...
```yaml
title: Scenario-title
description: Detailed description of the scenario
severity: High/Medium/Low
tags:
- oran
- 5gcore
- generic
detectionMethods: # Mechanisms to detect the threat
- name: Application log
tag:
- mitre/ds0015
description: Description # Optional
url: https://...
- name: Process
tag:
- accuknox/ax0015
description: Description # Optional
url: https://...
mitigationMethods: # Mechanisms to mitigate the threat
- name: Update Software
tag:
- mitre/ds0015
description: desc
url: https://...
- name: User Account Management
tag:
- accuknox/ax0015
description: desc
url: https://...
securityIntents:
- sample-si-1 # no params for now
- sample-si-2
securityIntentBinding: sample-si-binding.yaml
preDeploymentConsiderations: #Anything that can be done in CI/CD pipelines that can alleviate this threat
- sample-si-1.yaml
- sample-si-2.yaml
anurag-rajawat marked this conversation as resolved.
Show resolved Hide resolved
securityIntentBinding: # Set of labels, annotations describing workloads who would be impacted by this threat
- sample-si-binding.yaml
preDeploymentConsiderations: [ ] # Anything that can be done in CI/CD pipelines that can alleviate this threat
references:
- name: ref1
url:
- name: ref1
url: https://...
- name: ref2
url:
url: https://...
```

## Security Threats
- [threatPackageInstallation](threats/execution/threatPackageInstallation.yaml)
- [threatTemplate](threats/threatTemplate.yaml)

| Title | Description | Severity | Security Intents | References |
|:-----:|-------------|----------|------------|------------|

anurag-rajawat marked this conversation as resolved.
Show resolved Hide resolved
## Contributions welcome...

### Adding a new Security Intent
### Adding a new Security Threat

1. Fork and clone this repository
2. Create `security-intent-name.yaml` and `security-intent-binding-name.yaml` files
3. Copy the `intent.example` file and update it accordingly
2. Copy `res/threatTemplate.yaml` template file in [threats](threats)/`tactic` directory and edit the file's contents to
accurately reflect the specific threat information. For e.g., `execution` tactic from MITRE FiGHT.
```shell
cp intent.example intent
cp res/threatTemplate.yaml threats/execution/threat-name.yaml
```
3. Create the Security Intent file(s) you listed in the `.securityIntents` field of the `threat-name.yaml` file, and
place them within the [intents](intents) directory. For e.g.,
```yaml
...
securityIntents:
- sample-si.yaml
- sample-si-2.yaml
...
```
4. Run `make`
5. Raise a PR
10 changes: 0 additions & 10 deletions intent.example

This file was deleted.

17 changes: 0 additions & 17 deletions intents/core/blockAsset.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions intents/core/blockRawSocket.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions intents/core/protectAsset.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions intents/core/protectPort.yaml

This file was deleted.

21 changes: 21 additions & 0 deletions res/footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Contributions welcome...

### Adding a new Security Threat

1. Fork and clone this repository
2. Copy `res/threatTemplate.yaml` template file in [threats](threats)/`tactic` directory and edit the file's contents to
accurately reflect the specific threat information. For e.g., `execution` tactic from MITRE FiGHT.
```shell
cp res/threatTemplate.yaml threats/execution/threat-name.yaml
```
3. Create the Security Intent file(s) you listed in the `.securityIntents` field of the `threat-name.yaml` file, and
place them within the [intents](intents) directory. For e.g.,
```yaml
...
securityIntents:
- sample-si.yaml
- sample-si-2.yaml
...
```
4. Run `make`
5. Raise a PR
2 changes: 1 addition & 1 deletion tools/header.md → res/header.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Security Intents for Intent Driven Security

![CI status](https://github.com/5GSEC/security-intents/actions/workflows/ci-verify.yml/badge.svg)

Repository to hold Security Intents in standard template format.

![](res/nimbus.png)

40 changes: 40 additions & 0 deletions res/threatTemplate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
title: Scenario-title
description: Detailed description of the scenario
severity: High/Medium/Low
tags:
- oran
- 5gcore
- generic
detectionMethods: # Mechanisms to detect the threat
- name: Application log
tag:
- mitre/ds0015
description: Description # Optional
url: https://...
- name: Process
tag:
- accuknox/ax0015
description: Description # Optional
url: https://...
mitigationMethods: # Mechanisms to mitigate the threat
- name: Update Software
tag:
- mitre/ds0015
description: desc
url: https://...
- name: User Account Management
tag:
- accuknox/ax0015
description: desc
url: https://...
securityIntents:
- sample-si-1.yaml
- sample-si-2.yaml
securityIntentBinding: # Set of labels, annotations describing workloads who would be impacted by this threat
- sample-si-binding.yaml
preDeploymentConsiderations: [ ] # Anything that can be done in CI/CD pipelines that can alleviate this threat
references:
- name: ref1
url: https://...
- name: ref2
url: https://...
Loading
Loading