Skip to content

Commit def687e

Browse files
committed
docs(security): enhance security documentation and optimize package 📚
- Add proper markdown separators for better readability - Enhance SECURITY.md with comprehensive security features - Expand npm keywords for better discoverability - Remove CHANGELOG.md from npm bundle for leaner package - Remove version info from SECURITY.md to reduce maintenance
1 parent 7883f8c commit def687e

File tree

3 files changed

+50
-9
lines changed

3 files changed

+50
-9
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
---
99

10+
## [1.4.4] - 2025-09-06
11+
12+
### Changed
13+
- **Package optimization**: Removed CHANGELOG.md from npm bundle for leaner package size
14+
- **Documentation**: Enhanced SECURITY.md with comprehensive security features documentation
15+
- **Keywords**: Expanded npm keywords for better discoverability and searchability
16+
17+
### Documentation
18+
- **SECURITY.md**: Added detailed security validations and tamper protection features
19+
- **SECURITY.md**: Added proper markdown separators for better readability
20+
- **SECURITY.md**: Removed version info to reduce maintenance overhead
21+
- **package.json**: Added 15+ relevant keywords for better npm search visibility
22+
23+
---
24+
1025
## [1.4.3] - 2025-09-06
1126

1227
### Fixed

SECURITY.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,26 @@ We release patches for security vulnerabilities in the following versions:
1919

2020
### Security Validations
2121
- **Secret Key Length**: 8-255 characters minimum
22+
- **Secret Key Characters**: Only printable ASCII characters (32-126) allowed
2223
- **Expiration Limits**: Maximum 1 year token lifetime
2324
- **Cache Limits**: Maximum 10,000 tokens to prevent memory exhaustion
2425
- **Payload Size**: Maximum 8KB to prevent DoS attacks
2526
- **Version Validation**: Prevents downgrade attacks
27+
- **Key Derivation**: PBKDF2 with 50K iterations for secure key generation
28+
- **Token Format**: Strict base64 validation with length and padding checks
29+
- **IV Format**: Hexadecimal validation for initialization vectors
30+
- **Auth Tag Format**: 32-character hex validation for authentication tags
2631

2732
### Tamper Protection
2833
- **Authentication Tags**: Cryptographic verification of data integrity
2934
- **Version-based AAD**: Additional authenticated data prevents version manipulation
3035
- **Timestamp Validation**: Encrypted timestamps prevent expiration manipulation
3136
- **Algorithm Detection**: Automatic algorithm detection prevents cross-algorithm attacks
37+
- **Token Structure Validation**: Comprehensive validation of all token components
38+
- **Timestamp Consistency**: Payload and token timestamps must match exactly
39+
- **Data Type Validation**: Strict validation of all input data types
40+
41+
---
3242

3343
## Reporting a Vulnerability
3444

@@ -57,6 +67,8 @@ Include the following information:
5767
- We will credit you in our security advisories (unless you prefer to remain anonymous)
5868
- We will coordinate the public disclosure timeline with you
5969

70+
---
71+
6072
## Security Best Practices
6173

6274
### For Developers
@@ -73,6 +85,8 @@ Include the following information:
7385
- **Monitoring**: Monitor for unusual token patterns
7486
- **Updates**: Keep the library updated to the latest version
7587

88+
---
89+
7690
## Security Audit
7791

7892
This library has been tested against common attack vectors:
@@ -85,21 +99,20 @@ This library has been tested against common attack vectors:
8599
-**Secret Key Attacks**: Strong encryption prevents weak key exploitation
86100
-**Expiration Manipulation**: Encrypted timestamps prevent manipulation
87101

102+
---
103+
88104
## Security Updates
89105

90106
Security updates are released as:
91107
- **Patch versions** (1.3.1, 1.3.2, etc.) for critical security fixes
92108
- **Minor versions** (1.4.0, 1.5.0, etc.) for security improvements
93109
- **Major versions** (2.0.0, 3.0.0, etc.) for breaking security changes
94110

111+
---
112+
95113
## Contact
96114

97115
For security-related questions or concerns:
98116
- **Email**: me@neabyte.com
99117
- **Response Time**: Within 7 days
100118
- **Encryption**: PGP key available upon request
101-
102-
---
103-
104-
**Last Updated**: September 6, 2025
105-
**Version**: 1.4.3

package.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@neabyte/secure-jwt",
33
"description": "Secure JWT with AES-256-GCM & ChaCha20-Poly1305 encryption, built-in caching, tamper detection, and TypeScript support",
4-
"version": "1.4.3",
4+
"version": "1.4.4",
55
"type": "module",
66
"main": "./dist/index.js",
77
"types": "./dist/index.d.ts",
@@ -15,24 +15,37 @@
1515
"files": [
1616
"dist/**/*",
1717
"README.md",
18-
"LICENSE",
19-
"CHANGELOG.md"
18+
"LICENSE"
2019
],
2120
"keywords": [
2221
"jwt",
22+
"json-web-token",
2323
"secure",
2424
"encryption",
2525
"aes-256-gcm",
26+
"chacha20-poly1305",
2627
"authentication",
28+
"authorization",
2729
"token",
2830
"security",
31+
"crypto",
32+
"cryptography",
2933
"caching",
3034
"performance",
3135
"lru-cache",
3236
"typescript",
3337
"esm",
3438
"commonjs",
35-
"node"
39+
"node",
40+
"zero-dependencies",
41+
"tamper-proof",
42+
"authenticated-encryption",
43+
"pbkdf2",
44+
"key-derivation",
45+
"jwt-library",
46+
"secure-jwt",
47+
"fast-jwt",
48+
"high-performance"
3649
],
3750
"engines": {
3851
"node": ">=v18.0.0"

0 commit comments

Comments
 (0)