Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ jobs:
echo "No sensitive files found"

test:
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
name: Test (Node ${{ matrix.node-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: safety-check
strategy:
matrix:
node-version: [18, 20, 22]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false

steps:
Expand Down Expand Up @@ -336,3 +337,43 @@ jobs:
fi
echo "History preserved successfully with $COMMIT_COUNT commits"
timeout-minutes: 5

smoke-test:
name: Publish Smoke Test
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Verify built CLI works
run: |
node dist/index.js --version
node dist/index.js merge --help

- name: Type-check tests
run: pnpm tsc -p tests/tsconfig.json --noEmit

- name: Publish dry run
run: |
npm pack --dry-run 2>&1 | tee pack-output.txt
echo "--- Package contents ---"
cat pack-output.txt
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ jobs:
with:
scan-args: |-
--lockfile=pnpm-lock.yaml
fail-on-vuln: false
fail-on-vuln: true
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules/
dist/
*.log
.DS_Store
._*
coverage/
.env
.env.local
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.exclude": {
"**/._*": true
}
}
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Full lifecycle CLI commands: `add`, `archive`, `configure`, `migrate-branch`
- Extended analysis engine with environment, tooling, CI, publishing, and repo risk detection
- Risk classification system (straightforward / needs-decisions / complex)
- Path-filtered GitHub Actions workflow generation
- Configure engine for Prettier, ESLint, and TypeScript scaffolding
- Dependency enforcement via package manager overrides/resolutions
- Multi-language detection (Go, Rust, Python) with workspace scaffolding
- Smart defaults with evidence-based suggestions
- Performance utilities (concurrent mapping, disk space checks, progress events)
- Cross-platform path normalization
- 8-step wizard UI with SeverityBadge, DiffViewer, TreePreview, FindingsFilter components

### Security
- Fixed Python injection vulnerability in history preservation (SEC-01)
- Fixed path traversal vulnerability in apply command (SEC-02)
- Added install command executable allowlist (SEC-04)
- Replaced shell `exec()` with `execFile()` in browser opener (SEC-05)
- Added server authentication via shared-secret token (SEC-03)
- Added CORS, rate limiting, and body size limits to server
- Added symlink protection to file operations

### Fixed
- Async `.filter()` bug in gitignore merge that caused all paths to be included
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 pmclSF

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
25 changes: 25 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 0.x.x | :white_check_mark: |

## Reporting a Vulnerability

If you discover a security vulnerability in Monotize, please report it responsibly:

1. **Do not** open a public GitHub issue for security vulnerabilities
2. Email the maintainer or use [GitHub Security Advisories](https://github.com/pmclSF/monotize/security/advisories/new)
3. Include a description of the vulnerability, steps to reproduce, and potential impact
4. Allow up to 72 hours for an initial response

## Security Considerations

Monotize executes git commands and package manager operations on your behalf. When using it:

- Only merge repositories you trust
- Review plan files before applying them with `monotize apply`
- The web UI server (`monotize ui`) binds to localhost with token authentication — do not expose it to untrusted networks
- Never embed credentials directly in repository URLs — use SSH keys or credential helpers instead
23 changes: 21 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
{
"name": "monorepo-cli",
"name": "monotize",
"version": "0.2.0",
"description": "Combine multiple Git repositories into a monorepo with pnpm, yarn, or npm workspace support",
"type": "module",
"author": "pmclSF",
"repository": {
"type": "git",
"url": "https://github.com/pmclSF/monotize.git"
},
"homepage": "https://github.com/pmclSF/monotize#readme",
"bugs": {
"url": "https://github.com/pmclSF/monotize/issues"
},
"files": [
"dist",
"bin",
"README.md",
"LICENSE"
],
"bin": {
"monorepo": "./bin/monorepo.js",
"monotize": "./bin/monorepo.js",
"mr": "./bin/monorepo.js"
},
"exports": "./dist/index.js",
Expand Down Expand Up @@ -33,13 +48,17 @@
"commander": "^12.0.0",
"express": "^5.2.1",
"fs-extra": "^11.2.0",
"js-yaml": "^4.1.1",
"semver": "^7.7.3",
"simple-git": "^3.22.0",
"ws": "^8.19.0"
},
"devDependencies": {
"@types/express": "^5.0.6",
"@types/fs-extra": "^11.0.0",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.0.0",
"@types/semver": "^7.5.0",
"@types/supertest": "^7.2.0",
"@types/ws": "^8.18.1",
"@vitest/coverage-v8": "^2.0.0",
Expand Down
35 changes: 35 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading