The tmp package with promises support and disposers.
93
{
"context": "This criteria evaluates how well the engineer uses tmp-promise to implement secure temporary file handling, focusing on permission controls, manual cleanup patterns, and automatic cleanup using the disposer pattern.",
"type": "weighted_checklist",
"checklist": [
{
"name": "file() usage",
"description": "Uses tmp-promise's file() method to create temporary files in storeCredentials function",
"max_score": 15
},
{
"name": "mode option",
"description": "Correctly sets mode: 0o600 option when creating temporary files to ensure owner-only read/write permissions",
"max_score": 20
},
{
"name": "cleanup function",
"description": "Returns the cleanup function from file() as part of the return object in storeCredentials",
"max_score": 10
},
{
"name": "withFile() usage",
"description": "Uses tmp-promise's withFile() method for the processCredentialsSecurely function to implement automatic cleanup",
"max_score": 25
},
{
"name": "withFile callback",
"description": "Correctly implements the callback pattern for withFile, accessing the path property from the callback parameter",
"max_score": 10
},
{
"name": "withFile mode",
"description": "Sets mode: 0o600 option in the withFile() call to ensure secure permissions",
"max_score": 15
},
{
"name": "Credential writing",
"description": "Writes credentials to the temporary file using the file descriptor or path returned by tmp-promise",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-tmp-promisedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10