Gathering detailed insights and metrics for @dansmaculotte/nuxt-security
Gathering detailed insights and metrics for @dansmaculotte/nuxt-security
Gathering detailed insights and metrics for @dansmaculotte/nuxt-security
Gathering detailed insights and metrics for @dansmaculotte/nuxt-security
Module for Nuxt.js to configure security headers and more
npm install @dansmaculotte/nuxt-security
Typescript
Module System
Node Version
NPM Version
JavaScript (99.03%)
Vue (0.97%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
57 Stars
129 Commits
8 Forks
2 Watchers
1 Branches
3 Contributors
Updated on Dec 13, 2024
Latest Version
0.0.6
Package Id
@dansmaculotte/nuxt-security@0.0.6
Unpacked Size
13.35 kB
Size
4.74 kB
File Count
8
NPM Version
8.19.2
Node Version
16.13.2
Published on
Oct 17, 2022
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
Module for Nuxt.js 2 to configure security headers and more
This module as been developed for Nuxt 2. If you are looking for an equivalent compatible with Nuxt 3, please have a look to https://www.npmjs.com/package/nuxt-security.
This module allows you to configure various security headers such as CSP, HSTS or even generate security.txt file. Here is a list of availables features :
@dansmaculotte/nuxt-security
dependency to your project1yarn add @dansmaculotte/nuxt-security # or npm install @dansmaculotte/nuxt-security
@dansmaculotte/nuxt-security
to the modules
section of nuxt.config.js
1{ 2 modules: [ 3 // Simple usage 4 '@dansmaculotte/nuxt-security', 5 6 // With options 7 [ 8 '@dansmaculotte/nuxt-security', 9 { 10 /* module options */ 11 } 12 ] 13 ], 14 15 // Top level options 16 security: {} 17}
dev
process.env.SECURITY_DEV || false
Enable module in development mode
hsts
null
This option rely on helmet hsts package.
Example:
1hsts: { 2 maxAge: 15552000, 3 includeSubDomains: true, 4 preload: true 5},
csp
null
This option rely on helmet csp package.
Example:
1csp: { 2 directives: { 3 defaultSrc: ["'self'"], 4 scriptSrc: ["'self'"], 5 objectSrc: ["'self'"], 6 }, 7 reportOnly: false, 8},
referrer
null
This option rely on helmet referrer policy package.
Example:
1referrer: 'same-origin',
permissions
null
This option rely on permissions policy package.
Example:
1permissions: { 2 notifications: ['none'] 3},
Note: this come in replacement for feature
option as Feature-Policy
header is deprecated.
Previous features
option is still supported for now but displays a warning
and use Permissions-Policy header instead.
securityFile
null
This option allows you to generate a security.txt
described by securitytxt.org.
When generating for SPA applications, the file will appear in the dist/.well-known
folder.
For universal applications, the file is accessible at this path: /.well-known/security.txt
.
Example:
1securityFile: { 2 contacts: [ 3 'mailto:security@example.com', 4 'https://example.com/security' 5 ], 6 // or contacts: 'mailto:security@example.com' 7 canonical: 'https://example.com/.well-know/security.txt', 8 preferredLanguages: ['fr', 'en'], 9 // or preferredLanguages: 'fr', 10 encryptions: ['https://example.com/pgp-key.txt'], 11 // or encryptions: 'https://example.com/pgp-key.txt', 12 acknowledgments: ['https://example.com/hall-of-fame.html'], 13 // or acknowledgments: 'https://example.com/hall-of-fame.html', 14 policies: ['https://example.com/policy.html'], 15 // or policies: 'https://example.com/policy.html', 16 hirings: ['https://example.com/jobs.html'] 17 // or hirings: 'https://example.com/jobs.html' 18},
additionalHeaders
false
If true
it adds additional headers :
X-Frame-Options: SAMEORIGIN
- documentationX-Xss-Protection: 1; mode=block
- documentationX-Content-Type-Options: nosniff
- documentationyarn install
or npm install
npm run dev
Copyright (c) Dans Ma Culotte tech@dansmaculotte.fr
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 0/1 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
28 existing vulnerabilities detected
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