-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
75 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
appsec-rules: | ||
- ./appsec-rules/crowdsecurity/vpatch-CVE-2023-42793.yaml | ||
nuclei_template: cve-2023-42793.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
listen_addr: 127.0.0.1 | ||
listen_port: 4241 | ||
path: / | ||
source: appsec | ||
labels: | ||
type: appsec | ||
#appsec_config: appsec-test | ||
appsec_config_path: ./runtime/appsec-configs/config.yaml |
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.waap-tests/template_waap-profile.yaml → .appsec-tests/template_waap-profile.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: waap-test | ||
name: appsec-test | ||
inband_rules: | ||
- "crowdsecurity/*" # all rules | ||
default_remediation: ban |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
name: Waap Rules Tests | ||
name: Appsec Rules Tests | ||
on: | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- 'waap-configs/**.yaml' | ||
- 'waap-configs/**.yml' | ||
- 'waap-rules/**.yaml' | ||
- 'waap-rules/**.yml' | ||
- '.github/workflows/test_waap_rules.yaml' | ||
- '.waap-tests/**' | ||
- 'appsec-configs/**.yaml' | ||
- 'appsec-configs/**.yml' | ||
- 'appsec-rules/**.yaml' | ||
- 'appsec-rules/**.yml' | ||
- '.github/workflows/test_appsec_rules.yaml' | ||
- '.appsec-tests/**' | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- 'waap-configs/**.yaml' | ||
- 'waap-configs/**.yml' | ||
- 'waap-rules/**.yaml' | ||
- 'waap-rules/**.yml' | ||
- '.github/workflows/test_waap_rules.yaml' | ||
- '.waap-tests/**' | ||
- 'appsec-configs/**.yaml' | ||
- 'appsec-configs/**.yml' | ||
- 'appsec-rules/**.yaml' | ||
- 'appsec-rules/**.yml' | ||
- '.github/workflows/test_appsec_rules.yaml' | ||
- '.appsec-tests/**' | ||
|
||
jobs: | ||
run-hub-tests: | ||
|
@@ -54,25 +54,25 @@ jobs: | |
sudo ./install.sh -y | ||
- name: Setup NGINX Bouncer API key | ||
run: | | ||
sudo cscli bouncers add hubtestWaap -k "this_is_a_bad_password" | ||
sudo cscli bouncers add hubtestAppsec -k "this_is_a_bad_password" | ||
sudo sed -i 's/API_KEY=.*$/API_KEY=this_is_a_bad_password/' /etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf | ||
echo "WAF_URL=http://127.0.0.1:4241" | sudo tee -a /etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf | ||
sudo systemctl restart nginx | ||
- name: run tests on last crowdsec tag | ||
run: | | ||
cscli hubtest run --all --waap | ||
echo "WAAP_RULE_COV=$(cscli hubtest coverage --waap --percent | cut -d '=' -f2)" >> $GITHUB_ENV | ||
WAAP_RULE_COV_NUMBER=$(cscli hubtest coverage --waap --percent | cut -d '=' -f2 | tr -d '%' | tr -d '[[:space:]]') | ||
echo "WAAP_RULE_BADGE_COLOR=$(if [ "$WAAP_RULE_COV_NUMBER" -lt "70" ]; then echo 'red'; else echo 'green'; fi)" >> $GITHUB_ENV | ||
- name: Create waap badge | ||
cscli hubtest run --all --appsec | ||
echo "APPSEC_RULE_COV=$(cscli hubtest coverage --appsec --percent | cut -d '=' -f2)" >> $GITHUB_ENV | ||
APPSEC_RULE_COV_NUMBER=$(cscli hubtest coverage --appsec --percent | cut -d '=' -f2 | tr -d '%' | tr -d '[[:space:]]') | ||
echo "APPSEC_RULE_BADGE_COLOR=$(if [ "$APPSEC_RULE_COV_NUMBER" -lt "70" ]; then echo 'red'; else echo 'green'; fi)" >> $GITHUB_ENV | ||
- name: Create appsec badge | ||
uses: schneegans/[email protected] | ||
#if: ${{ github.ref == 'refs/heads/master' }} | ||
if: false | ||
with: | ||
auth: ${{ secrets.GIST_BADGES_SECRET }} | ||
gistID: ${{ secrets.GIST_BADGES_ID }} | ||
filename: hub_waap_badge.json | ||
label: Hub Waap | ||
message: ${{ env.WAAP_RULE_COV }} | ||
color: ${{ env.WAAP_RULE_BADGE_COLOR }} | ||
filename: hub_appsec_badge.json | ||
label: Hub Appsec | ||
message: ${{ env.APPSEC_RULE_COV }} | ||
color: ${{ env.APPSEC_RULE_BADGE_COLOR }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
1 change: 0 additions & 1 deletion
1
waap-rules/crowdsecurity/crs.yaml → appsec-rules/crowdsecurity/crs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
type: waap-rule | ||
name: crowdsecurity/crs-waf | ||
seclang_rules: | ||
- SecRuleEngine On | ||
|
1 change: 0 additions & 1 deletion
1
.../crowdsecurity/vpatch-CVE-2023-40044.yaml → .../crowdsecurity/vpatch-CVE-2023-40044.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
.../crowdsecurity/vpatch-CVE-2023-42793.yaml → .../crowdsecurity/vpatch-CVE-2023-42793.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
name: crowdsecurity/vpatch-CVE-2023-42793 | ||
description: CVE-2023-42793 | ||
type: waap-rule | ||
rules: | ||
- zones: | ||
- URI | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
name: crowdsecurity-waap/cisa-virtual-patching | ||
waap-rules: | ||
appsec-rules: | ||
- crowdsecurity/vpatch-CVE-2023-40044 | ||
- crowdsecurity/vpatch-CVE-2023-42793 | ||
waap-configs: | ||
appsec-configs: | ||
- crowdsecurity/vpatch | ||
parsers: | ||
- crowdsecurity/waap-logs | ||
- crowdsecurity/appsec-logs | ||
scenarios: | ||
- crowdsecurity/waap-vpatch | ||
- crowdsecurity/appsec-vpatch | ||
description: "a generic virtual patching collection, suitable for most web servers" | ||
author: crowdsecurity-waap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/crowdsecurity/crowdsec-waap-inband.yaml → ...crowdsecurity/crowdsec-appsec-inband.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters