ruvnet/ruflo · error · TeammateError
PERMISSION_DENIED
PERMISSION_DENIED
Error message
Invalid ${type} name: must be a non-empty string What it means
validateName() rejected a team or teammate name because it was empty, undefined, or not a string. This is the first step of the path-traversal defense: names become directory path components, so only non-empty strings pass to the character sanitization stage.
Source
Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:158
return 0;
}
function ensureDirectory(dirPath: string): void {
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath, { recursive: true, mode: 0o700 }); // Secure permissions
}
}
// ============================================================================
// Security Functions
// ============================================================================
/**
* Validate and sanitize team/teammate names to prevent path traversal
*/
function validateName(name: string, type: 'team' | 'teammate'): string {
if (!name || typeof name !== 'string') {
throw new TeammateError(
`Invalid ${type} name: must be a non-empty string`,
TeammateErrorCode.PERMISSION_DENIED
);
}
const trimmed = name.trim();
if (trimmed.length === 0) {
throw new TeammateError(
`Invalid ${type} name: cannot be empty`,
TeammateErrorCode.PERMISSION_DENIED
);
}
if (trimmed.length > MAX_NAME_LENGTH) {
throw new TeammateError(
`Invalid ${type} name: exceeds maximum length of ${MAX_NAME_LENGTH}`,
TeammateErrorCode.PERMISSION_DENIEDView on GitHub (pinned to fa13ee4ad6)
Solutions
- Provide a non-empty string name; trim whitespace and reject blank values at the boundary.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:158 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/e9b3d2880f26fbac.
Report an issue: GitHub.