Gathering detailed insights and metrics for @types/koa-csrf
Gathering detailed insights and metrics for @types/koa-csrf
Gathering detailed insights and metrics for @types/koa-csrf
Gathering detailed insights and metrics for @types/koa-csrf
The repository for high quality TypeScript type definitions.
npm install @types/koa-csrf
Typescript
Module System
74.5
Supply Chain
75.8
Quality
75.5
Maintenance
100
Vulnerability
100
License
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
50,027 Stars
89,737 Commits
30,434 Forks
640 Watchers
6 Branches
9,957 Contributors
Updated on Jul 12, 2025
Latest Version
5.0.4
Package Id
@types/koa-csrf@5.0.4
Unpacked Size
4.20 kB
Size
1.86 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
npm install --save @types/koa-csrf
This package contains type definitions for koa-csrf (https://github.com/koajs/csrf).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-csrf.
1/* =================== USAGE =================== 2import * as CSRF from "koa-csrf"; 3import * as Koa from "koa"; 4const app = new Koa(); 5 6app.use(new CSRF({ 7 errorHandler(ctx) { 8 return ctx.throw(403, 'Invalid CSRF token'); 9 }, 10 excludedMethods: ['GET', 'HEAD', 'OPTIONS'], 11 disableQuery: false, 12 ignoredPathGlobs: [] 13})); 14 =============================================== */ 15 16export = CSRF; 17 18import { Context, Middleware } from "koa"; 19 20declare module "koa" { 21 interface DefaultState { 22 _csrf: string; 23 } 24} 25 26declare const CSRF: { 27 new(opts?: { 28 errorHandler?: (ctx: Context) => never; 29 excludedMethods?: string[]; 30 disableQuery?: boolean; 31 ignoredPathGlobs?: string[]; 32 }): Middleware; 33}; 34
These definitions were written by Haskaalo, and Kirill Shvets.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More