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 * 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
14 lines
428 B
TypeScript
14 lines
428 B
TypeScript
import { resolveFileAccess } from '../shared/fileAccess';
|
|
import { Inject, Service } from 'typedi';
|
|
import winston from 'winston';
|
|
import config from '../config';
|
|
|
|
@Service()
|
|
export default class LogService {
|
|
constructor(@Inject('logger') private logger: winston.Logger) {}
|
|
|
|
public checkFilePath(filePath: string, fileName: string) {
|
|
return resolveFileAccess(config.logPath, [filePath || '', fileName], ['.tmp']);
|
|
}
|
|
}
|