Skip to content

Commit ea92f7a

Browse files
feat(*): Bump version
1 parent 8b294f5 commit ea92f7a

File tree

6 files changed

+39
-41
lines changed

6 files changed

+39
-41
lines changed

.github/workflows/doc-links.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ jobs:
3737
run: |
3838
gem install awesome_bot
3939
cd extension
40-
awesome_bot --files README.md --allow-dupe --allow-redirect --allow 401 --skip-save-results --white-list ddev.site --base-url http://localhost:8080/
41-
awesome_bot docs/*.md --allow-dupe --allow-redirect --allow 401 --skip-save-results --white-list crowdsec.net/v2,ddev.site,your-lapi-url,your-appsec-url,https://crowdsec,http://crowdsec --base-url http://localhost:8080/docs/
40+
awesome_bot --files README.md --allow-dupe --allow-redirect --allow 401,301 --skip-save-results --white-list ddev.site --base-url http://localhost:8080/
41+
awesome_bot docs/*.md --allow-dupe --allow-redirect --allow 401,301 --skip-save-results --white-list crowdsec.net/v2,ddev.site,your-lapi-url,your-appsec-url,https://crowdsec,http://crowdsec,http://localhost:7422 --base-url http://localhost:8080/docs/

.github/workflows/release.yml

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Create Release
2-
# example: gh workflow run release.yml -f tag_name=v1.1.4 -f draft=true
2+
# example: gh workflow run release.yml -f tag_name=v1.1.4
33
on:
44
workflow_dispatch:
55
branches:
@@ -8,18 +8,7 @@ on:
88
tag_name:
99
type: string
1010
required: true
11-
draft:
12-
type: boolean
13-
description: Draft release
14-
default: false
15-
prerelease:
16-
type: boolean
17-
description: Prerelease
18-
default: false
19-
first-release:
20-
type: boolean
21-
description: First release
22-
default: false
11+
2312

2413
jobs:
2514
prepare-release:
@@ -72,24 +61,21 @@ jobs:
7261
fi
7362
7463
# Check top [_Compare with previous release_](GITHUB_URL/compare/vLAST_TAG...vVERSION_NUMBER) in CHANGELOG.md
75-
if [[ ${{ github.event.inputs.first-release }} != "true" ]]
64+
echo "VERSION COMPARISON START"
65+
COMPARISON=$(grep -oP "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/\K(.*)$" CHANGELOG.md | head -1)
66+
LAST_TAG=$(curl -Ls -o /dev/null -w %{url_effective} $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/latest | grep -oP "\/tag\/\K(.*)$")
67+
if [[ $COMPARISON == "$LAST_TAG...v${{ env.VERSION_NUMBER }})" ]]
7668
then
77-
echo "VERSION COMPARISON START"
78-
COMPARISON=$(grep -oP "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/\K(.*)$" CHANGELOG.md | head -1)
79-
LAST_TAG=$(curl -Ls -o /dev/null -w %{url_effective} $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/latest | grep -oP "\/tag\/\K(.*)$")
80-
if [[ $COMPARISON == "$LAST_TAG...v${{ env.VERSION_NUMBER }})" ]]
81-
then
82-
echo "VERSION COMPARISON OK"
83-
else
84-
echo "VERSION COMPARISON KO"
85-
echo $COMPARISON
86-
echo "$LAST_TAG...v${{ env.VERSION_NUMBER }})"
87-
exit 1
88-
fi
69+
echo "VERSION COMPARISON OK"
70+
else
71+
echo "VERSION COMPARISON KO"
72+
echo $COMPARISON
73+
echo "$LAST_TAG...v${{ env.VERSION_NUMBER }})"
74+
exit 1
8975
fi
9076
9177
- name: Create Tag ${{ github.event.inputs.tag_name }}
92-
uses: actions/github-script@v6
78+
uses: actions/github-script@v7
9379
with:
9480
github-token: ${{ github.token }}
9581
script: |
@@ -107,7 +93,7 @@ jobs:
10793
echo "$VERSION_RELEASE_NOTES" >> CHANGELOG.txt
10894
10995
- name: Create release ${{ env.VERSION_NUMBER }}
110-
uses: softprops/action-gh-release@v1
96+
uses: softprops/action-gh-release@v2
11197
with:
11298
body_path: CHANGELOG.txt
11399
name: ${{ env.VERSION_NUMBER }}

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ As far as possible, we try to adhere to [Symfony guidelines](https://symfony.com
1515

1616
---
1717

18-
## [3.4.0](https://github.com/crowdsecurity/php-remediation-engine/releases/tag/v3.3.0) - 2024-??-??
18+
## [3.4.0](https://github.com/crowdsecurity/php-remediation-engine/releases/tag/v3.4.0) - 2024-10-04
1919
[_Compare with previous release_](https://github.com/crowdsecurity/php-remediation-engine/compare/v3.3.0...v3.4.0)
2020

2121
### Added
2222

2323
- Add AppSec requests support with `getAppSecRemediation` public method in `LapiRemediation` class
24-
24+
- Add `appsec_fallback_remediation` configuration for Lapi remediation
25+
2526

2627
### Changed
2728

docs/DEVELOPER.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,7 @@ Then, you have to [run the action manually from the GitHub repository](https://g
305305

306306

307307
Alternatively, you could use the [GitHub CLI](https://github.com/cli/cli):
308-
- create a draft release:
309-
```
310-
gh workflow run release.yml -f tag_name=vx.y.z -f draft=true
311-
```
312-
- publish a prerelease:
313-
```
314-
gh workflow run release.yml -f tag_name=vx.y.z -f prerelease=true
315-
```
308+
316309
- publish a release:
317310
```
318311
gh workflow run release.yml -f tag_name=vx.y.z

docs/USER_GUIDE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- [Stream mode](#stream-mode)
3030
- [Clean IP cache duration](#clean-ip-cache-duration)
3131
- [Bad IP cache duration](#bad-ip-cache-duration)
32+
- [AppSec fallback remediation](#appsec-fallback-remediation)
3233
- [Cache configurations](#cache-configurations)
3334
- [PhpFiles cache files directory](#phpfiles-cache-files-directory)
3435
- [Redis cache DSN](#redis-cache-dsn)
@@ -596,6 +597,23 @@ This is only useful in live mode. In stream mode, the cache duration depends onl
596597

597598
In seconds. Must be greater or equal than 1. Default to 120 seconds if not set.
598599

600+
### AppSec fallback remediation
601+
602+
```php
603+
$configs = [
604+
...
605+
'appsec_fallback_remediation' => 'captcha'
606+
...
607+
];
608+
```
609+
Will be used as remediation in case of AppSec failure (timeout).
610+
611+
Select from `bypass` (minimum remediation), `captcha` (recommended) or `ban` (maximum remediation).
612+
613+
This setting is not required. If you don't set any value, `captcha` will be used by default.
614+
615+
If you set some value, be aware to include this value in the `ordered_remediations` setting too.
616+
599617

600618
## Cache configurations
601619

src/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ class Constants extends CommonConstants
4949
/**
5050
* @var string The current version of this library
5151
*/
52-
public const VERSION = 'v3.3.0';
52+
public const VERSION = 'v3.4.0';
5353
}

0 commit comments

Comments
 (0)