mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
fix(security): restrict task environment controls and app scopes (#3121)
* fix(security): restrict task environment controls and app scopes * fix(security): preserve legacy scopes and add read-only access * feat(security): add read-only scopes for remaining resources * fix(security): reject apps scope grants in app API * fix(security): protect system app and task file boundaries * fix: block case-variant secret paths and task runner env overrides
This commit is contained in:
1 parent
a5f22f8d44
commit
442ab2c616
28 files changed
+782
-28
No files matched your search
+2
-2
@@ -48,7 +48,7 @@ ql auth logout --json
|
||||
```sh
|
||||
ql task create --name demo --command 'task demo.js' --schedule '0 0 * * *' --json
|
||||
ql subscription create --type public-repo --url https://example.com/repo.git --alias demo --schedule-type crontab --schedule '0 0 * * *' --json
|
||||
ql app create --name agent --scopes crons,subscriptions --show-secrets --json
|
||||
ql app create --name agent --scopes crons,subscriptions,envs --show-secrets --json
|
||||
ql env create --data @envs.json --json
|
||||
ql api request PUT /open/crons/run --data '[12,13]' --json
|
||||
```
|
||||
@@ -68,7 +68,7 @@ ql api request PUT /open/crons/run --data '[12,13]' --json
|
||||
|
||||
### 应用凭据登录
|
||||
|
||||
在面板创建专用应用,按需授予 crons、subscriptions、envs 等权限。`login` 与 `auth login` 等价;交互输入 Client ID 和不回显的 Client Secret,密钥不支持命令行参数。
|
||||
在面板创建专用应用,按需授予 crons、subscriptions 等权限。旧 scope 保留原有权限;仅读取时可选用 `crons:read`、`subscriptions:read`、`envs:read`、`configs:read`、`scripts:read`、`dependencies:read`、`logs:read`、`dashboard:read`。脚本和日志下载虽使用 POST,也允许对应只读权限;`GET /crons/import` 会写入任务,不属于只读操作。`login` 与 `auth login` 等价;交互输入 Client ID 和不回显的 Client Secret,密钥不支持命令行参数。
|
||||
|
||||
```sh
|
||||
ql login --url https://ql.example.com
|
||||
|
||||
Reference in new issue
Block a user