Skip to content

Commit 6d7280a

Browse files
committed
Describe the security features
1 parent e526f0c commit 6d7280a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ Some tips:
116116
- If multiple tasks are started with the same task ID, then the task status object will only track the first task that was started
117117
- Known issue: on Windows, checking task statuses can be slow (about 0.5 - 1 seconds) due to underlying bottlenecks
118118

119+
### Securing the task runners
120+
The way this library works means that attackers (or other unwanted parties) may simply craft malicious commands that mimic legitimate usage of this library.
121+
122+
To secure the task runners from being started illegitimately, you may configure the `.env` file to contain the following key:
123+
124+
```
125+
PROCESS_ASYNC_SECRET_KEY=[your secret key here]
126+
```
127+
128+
You may need to clear your Laravel optimisation cache after changing this value.
129+
130+
The contents of the async tasks will be signed by this secret key, so that this library can know whether the tasks are started by this library itself or someone else.
131+
119132
## Testing
120133
PHPUnit via Composer script:
121134
```sh

0 commit comments

Comments
 (0)