Skip to content

Commit 22fe7e9

Browse files
chore: Security audit fixes v1.1.0
- Reduce email exposure: Replace mailto links with website reference (michael-gahn.de) - Add HTTPS URL validation for manifest and download URLs - Implement exponential backoff retry logic with configurable max retries - Add Logger interface to replace console.log calls - Create package.json.example for project setup reference - Add CHANGELOG.md following Keep-a-Changelog format - Add SECURITY.md with vulnerability disclosure policy - Add tsconfig.json for TypeScript compilation - Add .github/workflows/lint.yml for CI/CD linting - Enhance JSDoc comments for better documentation Security improvements: - Enforce HTTPS-only protocol for all URLs - Validate URLs before download attempts - Automatic cleanup on download failures - Improved error messages and logging Backward compatible - no breaking changes to API. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 2c033d0 commit 22fe7e9

9 files changed

Lines changed: 490 additions & 53 deletions

File tree

‎.github/workflows/lint.yml‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Lint & Type Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [18.x, 20.x]
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Run ESLint
35+
run: npm run lint
36+
continue-on-error: false
37+
38+
- name: Run TypeScript type check
39+
run: npm run type-check
40+
continue-on-error: false
41+
42+
- name: Run tests
43+
run: npm run test -- --coverage
44+
continue-on-error: true
45+
46+
- name: Upload coverage
47+
uses: codecov/codecov-action@v3
48+
if: always()
49+
with:
50+
files: ./coverage/coverage-final.json
51+
flags: unittests
52+
name: codecov-umbrella

‎CHANGELOG.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Changelog
2+
3+
All notable changes to the MGD Software Updater Skill will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
---
9+
10+
## [1.1.0] - 2026-06-23
11+
12+
### Added
13+
- HTTPS URL validation for manifest and download URLs
14+
- `validateManifestUrl()` method to enforce secure transport
15+
- `package.json.example` for project setup
16+
- `CHANGELOG.md` for version tracking
17+
- `SECURITY.md` with vulnerability disclosure policy
18+
- `tsconfig.json` for TypeScript compilation settings
19+
- `.github/workflows/lint.yml` for CI/CD linting
20+
- JSDoc comments for improved code documentation
21+
- Exponential backoff retry logic for downloads
22+
- Automatic cleanup on download failures
23+
24+
### Changed
25+
- Updated email contact references to website links (michael-gahn.de)
26+
- Enhanced security documentation in Wiki
27+
- Improved error handling in update client
28+
29+
### Fixed
30+
- Email address exposure in public repositories
31+
- Missing protocol validation for URLs
32+
- Incomplete TypeScript configuration
33+
34+
### Security
35+
- Enforce HTTPS-only manifest and download URLs
36+
- Validate all external resource URLs before use
37+
- Improved error messages for security violations
38+
39+
---
40+
41+
## [1.0.0] - 2024-06-20
42+
43+
### Added
44+
- Initial release of MGD Software Updater Skill Assistent
45+
- 10-step planning methodology for update systems
46+
- 5 Maturity Levels (Manual to Enterprise)
47+
- Comprehensive Wiki with platform-specific guides
48+
- Examples for Electron, Flutter, React Native, Swift, Tauri, and more
49+
- TypeScript update client template
50+
- JSON manifest format specification
51+
- Checklists for planning and security audits
52+
- Support for Desktop, Mobile, Web, Backend, and Game platforms
53+
54+
### Features
55+
- Technology-agnostic approach
56+
- Two-phase workflow (Plan → Implement)
57+
- Security-focused best practices
58+
- DSGVO/GDPR compliance guidance
59+
- Testing and deployment strategies
60+
61+
---
62+
63+
## Note on Versions
64+
65+
- **v1.0.0**: Foundation release with complete planning framework
66+
- **v1.1.0**: Security audit and hardening release
67+
68+
For detailed implementation guides, see the [Wiki](wiki/) directory.
69+
For security concerns, see [SECURITY.md](SECURITY.md).

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,4 @@ Angaben gemäß § 5 DDG — Siehe [`IMPRESSUM.md`](IMPRESSUM.md).
228228

229229
---
230230

231-
**Fragen?** Öffne ein Issue auf GitHub oder kontaktiere mich unter `Anfrage@Michael-Gahn.de`.
231+
**Fragen?** Öffne ein Issue auf GitHub oder kontaktiere mich über meine Website [michael-gahn.de](https://michael-gahn.de).

‎SECURITY.md‎

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
If you discover a security vulnerability in the MGD Software Updater Skill or its templates, please report it responsibly.
6+
7+
### Reporting Process
8+
9+
1. **Do NOT open a public GitHub issue** for security vulnerabilities
10+
2. Send an email to the contact listed in [IMPRESSUM.md](IMPRESSUM.md) with:
11+
- Description of the vulnerability
12+
- Steps to reproduce
13+
- Potential impact
14+
- Suggested fix (if applicable)
15+
16+
3. Allow **7-14 days** for a response and patch development
17+
4. Credit will be given upon public disclosure (with your permission)
18+
19+
### Response Timeline
20+
21+
- **Day 1**: Acknowledgment of report
22+
- **Day 3-5**: Initial assessment and triage
23+
- **Day 7-14**: Fix development and testing
24+
- **Day 14+**: Public disclosure and release of patched version
25+
26+
---
27+
28+
## Security Best Practices
29+
30+
### For Users of This Skill
31+
32+
When implementing update systems based on this Skill:
33+
34+
1. **Always use HTTPS** for manifest and download URLs (enforced in v1.1.0+)
35+
2. **Validate checksums** before installation (SHA256 minimum)
36+
3. **Sign your releases** (Code-signing for Level 4+ maturity)
37+
4. **Test thoroughly** on staging before production rollout
38+
5. **Monitor downloads** and crash rates post-release
39+
6. **Keep backups** of previous versions for rollback
40+
7. **Audit logs** for update transactions
41+
8. **Encrypt sensitive data** in transit and at rest
42+
43+
### For this Repository
44+
45+
- All external URLs enforce HTTPS protocol validation
46+
- Manifest JSON structure is validated before processing
47+
- Checksums are verified against expected hashes
48+
- No sensitive credentials are stored in templates
49+
- Code examples follow security best practices
50+
51+
---
52+
53+
## Known Limitations
54+
55+
### v1.1.0
56+
57+
- URL validation checks protocol only (not DNS rebinding attacks)
58+
- Checksum verification uses SHA256 (SHA-512 recommended for Level 5)
59+
- Certificate pinning not yet implemented (recommended for Level 4+)
60+
- No automatic rollback on failure (manual intervention required)
61+
62+
### Roadmap (Future Versions)
63+
64+
- [ ] Certificate pinning support
65+
- [ ] Automatic rollback decision logic
66+
- [ ] Multi-signature support
67+
- [ ] Update encryption
68+
- [ ] Rate limiting and DDoS protection
69+
- [ ] Audit log encryption
70+
71+
---
72+
73+
## Compliance
74+
75+
This Skill addresses requirements for:
76+
77+
- **OWASP**: Secure coding practices
78+
- **DSGVO/GDPR**: Data protection guidelines (see `wiki/08-DSGVO-Datenschutz.md`)
79+
- **BSI**: German security standards
80+
- **PCI DSS**: If handling payment-related updates
81+
82+
For specific compliance needs, consult the relevant documentation in `/wiki`.
83+
84+
---
85+
86+
## Version History
87+
88+
| Version | Security Updates |
89+
|---------|------------------|
90+
| v1.0.0 | Initial release, baseline security |
91+
| v1.1.0 | HTTPS validation, error handling, documentation |
92+
93+
---
94+
95+
## Contact
96+
97+
For security questions or vulnerabilities, see [IMPRESSUM.md](IMPRESSUM.md).
98+
99+
**Last Updated:** 2026-06-23
100+
**License:** MIT

‎STRUCTURE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,4 @@ To add your own update template:
209209
**Last Updated:** 2024-06-20
210210
**License:** MIT
211211

212-
For questions: `Anfrage@Michael-Gahn.de`
212+
For questions: See [michael-gahn.de](https://michael-gahn.de)

‎package.json.example‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "update-client-example",
3+
"version": "1.0.0",
4+
"description": "Software Update Client Example Configuration",
5+
"scripts": {
6+
"build": "tsc",
7+
"test": "jest",
8+
"test:watch": "jest --watch",
9+
"lint": "eslint . --ext .ts,.tsx",
10+
"lint:fix": "eslint . --ext .ts,.tsx --fix",
11+
"type-check": "tsc --noEmit"
12+
},
13+
"keywords": [
14+
"software-updater",
15+
"auto-update",
16+
"version-management"
17+
],
18+
"author": "Michael Gahn",
19+
"license": "MIT",
20+
"dependencies": {},
21+
"devDependencies": {
22+
"@types/jest": "^29.5.0",
23+
"@types/node": "^20.0.0",
24+
"@typescript-eslint/eslint-plugin": "^6.0.0",
25+
"@typescript-eslint/parser": "^6.0.0",
26+
"eslint": "^8.45.0",
27+
"jest": "^29.7.0",
28+
"ts-jest": "^29.1.0",
29+
"ts-node": "^10.9.1",
30+
"typescript": "^5.1.0"
31+
}
32+
}

‎skill/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ Agent muss am Ende dokumentieren:
10001000

10011001
## Support & Issues
10021002

1003-
Fragen? Öffne ein Issue auf GitHub oder kontaktiere mich unter `Anfrage@Michael-Gahn.de`.
1003+
Fragen? Öffne ein Issue auf GitHub oder besuche [michael-gahn.de](https://michael-gahn.de).
10041004

10051005
---
10061006

0 commit comments

Comments
 (0)