SecureZip

July 3, 2026 · View on GitHub

CodeQL CI VS Code Marketplace

SecureZip is a Visual Studio Code extension that lets you securely export your project as a clean ZIP archive.

Stable export workflow with ignore tooling, auto-commit, and tagging.

✹ Features

  • 📊 Export to ZIP – Create a ZIP of your project with one click.
  • 🔐 Encrypted ZIP – Optionally protect the archive with an AES-256 password (WinZip AES).
  • 🔄 Optional Auto Commit – Offer to commit tracked changes before export, with a toggle to include untracked files automatically.
  • 🏷 Auto Tagging – Tag the repository with the export timestamp for traceability.
  • 🧹 Smart Ignore Support – Respects .gitignore and project-specific .securezipignore to strip secrets and build artifacts.

⚙ Auto Commit Stage Mode

SecureZip only offers the auto-commit step when it detects local changes. By default it stages tracked files via git add --update, matching the safe workflow shown in the warning dialog. If you prefer SecureZip to stage new files as well, switch the stage mode in your settings:

{
  "secureZip.autoCommit.stageMode": "all"
}
  • tracked (default) – Stage edits/deletions to tracked files only.
  • all – Stage tracked and untracked files (git add --all).

🏷 Tagging Mode

SecureZip can tag exports for traceability. Choose the tagging behavior per export or set a default:

{
  "secureZip.tagging.mode": "ask"
}
  • ask (default) – Prompt to use the default tag, skip, or enter a custom tag.
  • always – Always create the default export tag.
  • never – Skip tagging entirely.

Encrypted exports use a distinct default tag, such as export-encrypted-YYYYMMDD-HHmmss (or <tagPrefix>-encrypted-YYYYMMDD-HHmmss when you customize secureZip.tagPrefix).

🔐 Encrypted ZIP

SecureZip can produce password-protected archives in addition to the regular export. Two commands are available from the Command Palette and the SecureZip view Actions section:

  • SecureZip: Export Encrypted ZIP (securezip.exportEncrypted) – encrypted variant of the single-root export.
  • SecureZip: Export Workspace Encrypted ZIP (securezip.exportWorkspaceEncrypted) – encrypted variant of the multi-root workspace export.

When you run either command SecureZip prompts twice (password + confirmation). Mismatched entries trigger a re-prompt; cancelling either prompt aborts the export without writing any file. The archive uses WinZip AES-256 (method 99) for entry encryption.

Successful encrypted exports are identified as encrypted in the SecureZip view's Recent Exports section. When a Git tag is associated with the export, that tag is shown with the recent export entry. The default save name also includes -encrypted-, for example project-encrypted-YYYYMMDD-HHmmss.zip.

Compatibility

WinZip AES-256 is widely supported by modern tools (7-Zip, Keka, WinRAR, WinZip), but the legacy "Compressed Folder" viewer on Windows and Info-ZIP unzip 6.00 / older unzip builds cannot open these archives. Distribute encrypted archives only to recipients who have a compatible extractor.

What is and isn't protected

Encryption applies to file contents only. The following metadata is not hidden by the format:

  • File names, directory structure, and archive layout
  • Per-entry sizes, timestamps, CRC values, and compression settings
  • The fact that the archive is encrypted

If the names or structure of your files are themselves sensitive, encrypt the archive again inside an outer container (e.g. a 7z archive with header encryption) before sharing.

Failure semantics and concurrency

  • SecureZip writes the encrypted archive to a temporary .partial file in the output directory and renames it on success. If the write or rename fails the temporary file is removed and any pre-existing ZIP at the destination is left untouched.
  • When replacing an existing archive inside the export tree, SecureZip excludes that destination file and leftover SecureZip .partial files from the new archive. Existing destination permission bits are applied to the temporary archive on a best-effort basis before it is renamed into place.
  • The Git steps (auto-commit / tag) run before the archive is written. If a ZIP failure occurs after auto-commit or tagging has already succeeded, the resulting commit or tag remains in your repository – review git log / git tag and revert manually if you need to roll the change back.
  • A second export invocation while one is already running is rejected with a warning ("Export is already running"); concurrent runs cannot interleave.

🛡 Ignore Rules

SecureZip respects the following when selecting files to include:

  • .gitignore – Acknowledged automatically.
  • .securezipignore – Project rules to exclude and re-include files for export.
  • Preview deduplication: the SecureZip view merges duplicates with priority .securezipignore > .gitignore > auto-excludes, hides comments/blank lines and unmatched entries, and shows suppressed sources in the tooltip (“Also excluded by 
”).

.securezipignore syntax (gitignore-like subset):

  • # comment and empty lines are ignored.
  • pattern excludes matches.
  • !pattern re-includes matches (overrides only .securezipignore excludes).
  • /path is treated as workspace-root relative.
  • dir/ matches a directory (expanded to dir/**).

Examples:

# Exclude all build outputs
dist/

out/

# Exclude all env files, but allow the example
.env*

!.env.example

# Keep a specific file inside an excluded folder
!dist/manifest.json

🔧 Feature Flags

SecureZip supports lightweight feature flags with both build-time defaults and runtime overrides.

  • Runtime setting (recommended for users):
    • secureZip.flags.enableStatusBarButton (default: true)
  • Build-time defaults (for maintainers):
    • esbuild.js injects __BUILD_FLAGS__ using define, allowing different defaults per build.
  • Rollout helpers:
    • src/flags.ts provides utilities to compute deterministic buckets from machineId if gradual rollout is needed.

Example settings.json override:

{
  "secureZip.flags.enableStatusBarButton": false
}

🚀 Use Cases

  • Delivering project source code to clients without leaking secrets.
  • Creating reproducible “release snapshots” of work-in-progress.
  • Archiving a clean, tagged version of your repository for audit or compliance.

🧟 SBOM

  • npm run sbom generates dist/securezip-sbom.cdx.json in CycloneDX format so the extension bundle always ships with a fresh dependency inventory.
  • The SBOM step also runs automatically after npm run package; see docs/sbom.md for details and customization tips.

📖 Roadmap

  • Multiple archive formats (.tar.gz, .7z)
  • Custom exclude profiles (audit, distribution, etc.)
  • 🗂 Manifest File – Embed an __export_manifest.json with commit ID, tag, and export metadata (future candidate)

📥 Download

🛠 Developer Resources

  • Contributing guide – setup, coding standards, and PR checklist.
  • Testing guide – how to run type checks, linters, unit, and integration tests.
  • Release process – preview/stable branching strategy and versioning rules.
  • Architecture overview – maps key modules and data flows.
  • Multi-root workspaces – target resolution and workspace ZIP behavior.
  • Localization guide – adding translations for runtime and contribution strings.
  • SBOM instructions – details about npm run sbom and the bundled CycloneDX file.
  • Packaging preflight: run npm run package:verify before tagging/release to catch VS Code engine mismatches for vsce.

📄 License

SecureZip is distributed under the MIT License.


SecureZip日本語

SecureZip は、プロゞェクトを安党か぀クリヌンな ZIP アヌカむブずしお゚クスポヌトできる Visual Studio Code 拡匵機胜です。

゚クスポヌトの安定版フロヌignore 察応、自動コミット、タグ付けを提䟛したす。

✹ 機胜

  • 📊 Export to ZIP – プロゞェクトをワンクリックで ZIP アヌカむブずしお゚クスポヌトしたす。
  • 🔐 暗号化 ZIP – AES-256WinZip AESでパスワヌド保護した ZIP を生成できたす。
  • 🔄 Auto Commit任意蚭定 – ゚クスポヌト前に远跡枈み倉曎をコミットするよう確認し、必芁であれば未远跡ファむルも自動ステヌゞできたす。
  • 🏷 Auto Tagging – ゚クスポヌト時刻を利甚しおリポゞトリにタグを付けたす。
  • 🧹 スマヌトな陀倖サポヌト – .gitignore ず .securezipignore を尊重し、機密情報やビルド成果物を陀倖したす。

⚙ Auto Commit ステヌゞモヌド

SecureZip が未コミット倉曎を怜出したずきだけ自動コミットを提案したす。既定では git add --update远跡枈みファむルのみを実行したすが、蚭定で未远跡ファむルも含めるように切り替えられたす。

{
  "secureZip.autoCommit.stageMode": "all"
}
  • tracked既定– 远跡枈みファむルの倉曎/削陀のみをステヌゞ。
  • all – 远跡枈み未远跡ファむルをステヌゞgit add --all 盞圓。

🏷 タグ付けモヌド

SecureZip ぱクスポヌト時の远跡性向䞊のため、タグ付けの挙動を遞択できたす。

{
  "secureZip.tagging.mode": "ask"
}
  • ask既定– 毎回、デフォルトタグ/スキップ/カスタムを遞択したす。
  • always – 垞にデフォルトタグを䜜成したす。
  • never – タグ付けを行いたせん。

暗号化゚クスポヌトのデフォルトタグは通垞 ZIP ず区別できるよう、 export-encrypted-YYYYMMDD-HHmmss 圢匏になりたす。 secureZip.tagPrefix を倉曎しおいる堎合は <tagPrefix>-encrypted-YYYYMMDD-HHmmss 圢匏です。

🔐 暗号化 ZIP

SecureZip は通垞゚クスポヌトに加えお、パスワヌド保護付きの ZIP を生成できた す。コマンドパレットおよび SecureZip ビュヌのアクションセクションから次の 2 ぀のコマ ンドを利甚できたす。

  • SecureZip: Export Encrypted ZIPsecurezip.exportEncrypted – 単䞀 ルヌト向けの暗号化゚クスポヌト。
  • SecureZip: Export Workspace Encrypted ZIP securezip.exportWorkspaceEncrypted – マルチルヌトワヌクスペヌス向け の暗号化゚クスポヌト。

実行するずパスワヌドず確認入力の 2 段階のプロンプトが衚瀺されたす。䞍䞀臎の 堎合は再入力を求め、いずれかをキャンセルするず ファむルを曞き出さずに䞭断 したす。゚ントリ暗号化には WinZip AES-256method 99 を䜿甚したす。

成功した暗号化゚クスポヌトは、SecureZip ビュヌの「最近の゚クスポヌト」で暗 号化 ZIP ずしお衚瀺されたす。Git タグが関連付けられおいる堎合は、そのタグも 最近の履歎に衚瀺されたす。保存ダむアログの既定ファむル名にも -encrypted- が入り、䟋ずしお project-encrypted-YYYYMMDD-HHmmss.zip のようになりたす。

互換性

WinZip AES-256 は 7-Zip / Keka / WinRAR / WinZip など、珟代的な解凍ツヌルで 広くサポヌトされおいたすが、Windows 暙準の「圧瞮フォルダヌ」ビュヌや Info-ZIP unzip 6.00 / 叀い unzip は AES 圢匏の ZIP を開けたせん。配垃 先で察応ツヌルが利甚できるこずを確認しおから共有しおください。

保護されない情報

暗号化の察象は ファむル本文のみ です。次のメタ情報は保護されたせん。

  • ファむル名・ディレクトリ構造・アヌカむブ党䜓のレむアりト
  • 各゚ントリのサむズ、タむムスタンプ、CRC、圧瞮蚭定
  • アヌカむブが暗号化されおいるずいう事実そのもの

ファむル名や構成自䜓が機密に該圓する堎合は、ヘッダ暗号化に察応した倖偎のコ ンテナ䟋: 7z のヘッダ暗号化でさらに包んでから共有しおください。

倱敗時の挙動ず排他制埡

  • 暗号化 ZIP は出力先ディレクトリ内の䞀時ファむル .partial に曞き出しおか ら、成功時に最終ファむル名ぞリネヌムしたす。曞き蟌みやリネヌムが倱敗した 堎合は䞀時ファむルを削陀し、出力先に既存 ZIP があればそれは䞊曞きされ ず保党されたす。
  • ゚クスポヌト察象ツリヌ内の既存アヌカむブを眮き換える堎合、出力先ファむル ず SecureZip が残した .partial ファむルは新しい ZIP に含めたせん。出力 先ファむルが既に存圚する堎合は、その暩限ビットをベスト゚フォヌトで䞀時 アヌカむブぞ適甚しおからリネヌムしたす。
  • Git の自動コミット / タグ付けは ZIP 曞き出しの 前 に実行されたす。ZIP 曞き出し以降の段階で倱敗した堎合、盎前の自動コミットやタグはリポゞトリ に残る こずがありたす。git log / git tag を確認し、必芁に応じお手動 でロヌルバックしおください。
  • 別の゚クスポヌトが既に実行䞭のずきに再実行を詊みるず、譊告 "Export is already running."を衚瀺しお 2 回目の起動は砎棄 された す。同時実行は行われたせん。

🛡 無芖ルヌル

SecureZip はアヌカむブに含めるファむルを遞ぶ際、次のルヌルを尊重したす。

  • .gitignore – 自動的に適甚されたす。
  • .securezipignore – ゚クスポヌト専甚に陀倖や再包含を指定するプロゞェクトルヌルです。
  • SecureZip ビュヌのプレビュヌでは、.securezipignore > .gitignore > 自動陀倖の優先順で同䞀パタヌンを1行にたずめ、コメント/空行や未マッチ行は衚瀺したせん抑制された出兞はツヌルチップに衚瀺。

.securezipignore の構文gitignore 互換のサブセット:

  • # comment や空行は無芖されたす。
  • pattern は䞀臎した項目を陀倖したす。
  • !pattern は䞀臎した項目を再包含したす.securezipignore の陀倖のみを䞊曞き。
  • /path はワヌクスペヌスルヌトからの盞察パスです。
  • dir/ はディレクトリに䞀臎し、dir/** に展開されたす。

䟋:

# ビルド成果物を陀倖
dist/

out/

# env ファむルを陀倖䟋倖あり
.env*

!.env.example

# 陀倖ディレクトリ内の特定ファむルは残す
!dist/manifest.json

🔧 機胜フラグ

SecureZip は、ビルド時のデフォルトず実行時の䞊曞きを組み合わせた軜量な機胜フラグをサポヌトしおいたす。

  • ランタむム蚭定ナヌザヌ向け:
    • secureZip.flags.enableStatusBarButtonデフォルト: true
  • ビルド時デフォルトメンテナヌ向け:
    • esbuild.js が define で __BUILD_FLAGS__ を泚入し、ビルドごずに異なるデフォルトを蚭定できたす。
  • 段階的ロヌルアりト支揎:
    • src/flags.ts は machineId から決定的なバケットを算出するナヌティリティを提䟛したす。

settings.json での䞊曞き䟋:

{
  "secureZip.flags.enableStatusBarButton": false
}

🚀 ナヌスケヌス

  • クラむアントぞの゜ヌスコヌド提䟛時に機密情報流出を防ぐ。
  • 進行䞭の䜜業を再珟可胜な「リリヌススナップショット」ずしお保存する。
  • 監査・コンプラむアンス察応でタグ付きのクリヌンなリポゞトリ状態をアヌカむブする。

🧟 SBOM

  • npm run sbom で CycloneDX 圢匏の dist/securezip-sbom.cdx.json を生成し、拡匵が䟝存関係の䞀芧を同梱できるようにしたした。
  • npm run package 完了埌にも SBOM が自動出力されたす。詳しくは docs/sbom.md を参照しおください。

📖 ロヌドマップ

  • 耇数アヌカむブ圢匏.tar.gz、.7z などぞの察応
  • audit や distribution などのカスタム陀倖プロファむル
  • 🗂 Manifest File – コミット ID、タグ、゚クスポヌト情報を含む __export_manifest.json の埋め蟌み将来的な候補

📥 ダりンロヌド

  • VS Code Marketplace からむンストヌル: yugook.securezip

🛠 開発者向けリ゜ヌス

📄 ラむセンス

SecureZip は MIT License で配垃しおいたす。