Skip to content

Commit

Permalink
DevSecOps++
Browse files Browse the repository at this point in the history
  • Loading branch information
Aif4thah committed Sep 13, 2024
1 parent 32faf6b commit e08d1f8
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 39 deletions.
24 changes: 0 additions & 24 deletions Dojo-101-DevSec/DREAD.md

This file was deleted.

2 changes: 1 addition & 1 deletion Dojo-101-DevSec/Github-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ git push -f origin main #push vers la branche main
git gc --aggressive --prune=all # supression des anciens fichiers
```

## Actions
## Actions / Workflows

This workflow will build a .NET project, [more information here](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net)

Expand Down
41 changes: 28 additions & 13 deletions Dojo-101-DevSec/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Développement sécurisé / DevSec basics


## Référentiels et bonnes pratiques

* [Projets OWASP](https://owasp.org/projects/)

* [Guides ANSSI](https://cyber.gouv.fr)

* [Chaine DevOps](https://learn.microsoft.com/fr-fr/azure/cloud-adoption-framework/ready/considerations/devops-toolchain#azure-devops-and-github-toolchain)

* [OWASP ASVS](https://github.com/OWASP/ASVS)


## Intégration de la sécurité au Software Development LifeCycle (SDLC)

| Exigences | Conception | Développement | Déploiement | Maintenance |
Expand Down Expand Up @@ -43,13 +54,17 @@
* Contournements / mauvais respect des workflows


## Référentiels et bonnes pratiques
## Notions de vulnérabilité

* [Projets OWASP](https://owasp.org/projects/)
Risque = Impact * Vraisemblance

* [Guides ANSSI](https://cyber.gouv.fr)
Vulnérabilité = Faiblesse du SI

* [Chaine DevOps](https://learn.microsoft.com/fr-fr/azure/cloud-adoption-framework/ready/considerations/devops-toolchain#azure-devops-and-github-toolchain)
Menace = Cause potentielle de l’incident

Impact = Gravité, portée de l’incident sur les échelles et critères DICT

Risque = Vuln + Menace + Impact


## énumeration des vulnréabilités et mauvaise pratiques
Expand All @@ -61,17 +76,18 @@
* [liste des CWE](https://cwe.mitre.org/)


## Notions de vulnérabilité
## DREAD : Evaluation d'une vulnérabilité

Risque = Impact * Vraisemblance
* Damage potential : If exploited, how harmful could it be?

Vulnérabilité = Faiblesse du SI
* Reproducibility : Will attacks succeed every time, some of the time, or only rarely?

Menace = Cause potentielle de l’incident
* Exploitability : How hard, in terms of technical difficulty, effort, and cost, is the vulnerability to exploit? How long is the attack path?

Impact = Gravité, portée de l’incident sur les échelles et critères DICT
* Affected users :Will all, some, or only a few users be impacted? Can specific targets be easily attacked, or are the victims arbitrary?

* Discoverability : How likely is it that attackers will find the vulnerability?

Risque = Vuln + Menace + Impact

## CIA Information security:

Expand Down Expand Up @@ -105,6 +121,7 @@ Risque = Vuln + Menace + Impact

* Paranoid


## Oganisational security Documents

1. Policies
Expand All @@ -116,7 +133,6 @@ Risque = Vuln + Menace + Impact
3. Procedures



## suivi des besoins sécurité

1. Besoin de sécurité identifié par la sécurité
Expand All @@ -127,7 +143,6 @@ Risque = Vuln + Menace + Impact

4. Implémentation par le projet


5. Recette sécurité par la sécurité

6. Evaluation du risque résiduel par la sécurité
Expand Down Expand Up @@ -165,7 +180,7 @@ retour à 1



## exemple de référentiel : l'OWASP ASVS
## exemple de référentiel :

[owasp-asvs](https://owasp.org/www-project-application-security-verification-standard/) complet au format csv :

Expand Down
36 changes: 35 additions & 1 deletion Dojo-101-DevSec/Rust-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,43 @@ cargo add regex
```

Le code sera dans `main.rs`
Les versions des dépendances sont alors spécifié dans le fichier `Cargo.toml`
Les versions des dépendances sont alors spécifié dans le fichier `Cargo.toml`, Cargo gère automatiquement le fichier `Cargo.lock`
Pour mettre à jour des dépendances : `cargo-update`


## Test via CI/CD

### github actions

exemple :

```yml
name: Rust

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
working-directory: ./quality
run: cargo build --verbose
- name: Run tests
working-directory: ./quality
run: cargo test --verbose
```
## Variables
```rust
Expand Down

0 comments on commit e08d1f8

Please sign in to comment.