Skip to content

Commit 9b77104

Browse files
authored
feat: project refresh (#13)
* chore: bump deps * feat: update project * docs: update documentation * chore: split ci configuration * chore: bump project version * chore: small fixes
1 parent 08ec20b commit 9b77104

87 files changed

Lines changed: 5530 additions & 4194 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'sandbox_cli/**'
8+
- 'pyproject.toml'
9+
- '.github/workflows/ci.yml'
10+
pull_request:
11+
paths:
12+
- 'sandbox_cli/**'
13+
- 'pyproject.toml'
14+
- '.github/workflows/ci.yml'
15+
16+
jobs:
17+
lint:
18+
name: Lint & Type Check
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
23+
- uses: astral-sh/setup-uv@v7
24+
25+
- uses: actions/setup-python@v6
26+
with:
27+
python-version: '3.13'
28+
29+
- name: Install dependencies
30+
run: uv sync --active
31+
32+
- name: Ruff check
33+
run: uv run ruff check sandbox_cli
34+
35+
- name: Ruff format
36+
run: uv run ruff format --check sandbox_cli
37+
38+
- name: Mypy
39+
run: uv run mypy --config-file=pyproject.toml sandbox_cli

.github/workflows/deploy.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
- '.github/workflows/docs.yml'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
deploy:
18+
name: Deploy to GitHub Pages
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
23+
- uses: astral-sh/setup-uv@v7
24+
25+
- uses: actions/setup-python@v6
26+
with:
27+
python-version: '3.13'
28+
29+
- name: Sync docs dependencies
30+
run: uv sync --no-group dev --group docs --active
31+
32+
- name: Deploy mkdocs to GitHub Pages
33+
run: mkdocs gh-deploy --config-file ./mkdocs.yml --force

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
publish:
12+
name: Publish to PyPI
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: astral-sh/setup-uv@v7
20+
21+
- uses: actions/setup-python@v6
22+
with:
23+
python-version: '3.13'
24+
25+
- name: Install twine
26+
run: uv pip install twine --system
27+
28+
- name: Build package
29+
run: uv build
30+
31+
- name: Check package
32+
run: twine check dist/*
33+
34+
- name: Publish to PyPI
35+
env:
36+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
37+
run: twine upload --repository pypi dist/* --username __token__ --password "$PYPI_API_TOKEN" --verbose

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.14.0
4+
hooks:
5+
- id: ruff-check
6+
args: [--fix, --exit-non-zero-on-fix]
7+
- id: ruff-format
8+
9+
- repo: https://github.com/pycqa/isort
10+
rev: 8.0.1
11+
hooks:
12+
- id: isort
13+
args: [--profile, black, --line-length, "120"]
14+
15+
- repo: https://github.com/psf/black
16+
rev: 26.5.1
17+
hooks:
18+
- id: black
19+
language_version: python3
20+
21+
- repo: https://github.com/pre-commit/mirrors-mypy
22+
rev: v2.3.0
23+
hooks:
24+
- id: mypy
25+
additional_dependencies:
26+
- types-aiofiles==25.1.0.20260518
27+
- types-docker==7.2.0.20260728
28+
- types-colorama==0.4.15.20260508
29+
- ptsandbox>=5.1.0
30+
- docker>=7.2.0
31+
- cyclopts>=4.20.0
32+
- rich>=15.0.0
33+
- zstandard>=0.25.0
34+
- asyncssh>=2.24.0
35+
- pydantic
36+
args: [--config-file=pyproject.toml, sandbox_cli]
37+
pass_filenames: false

docs/changelog.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,134 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.3.0
9+
10+
### Added
11+
12+
- `completion` command for generating and installing shell completions (bash, zsh, fish)
13+
- `--all` flag for `images` command to fetch images from all configured sandboxes
14+
- `--suspicious` flag for `report` command to include suspicious detects
15+
- `--open-browser` flag for `scan`, `scan-new` and `re-scan` commands
16+
- `--preserve-filename` flag for `scan-new` to keep the original filename during analysis
17+
- `--wait-timeout` option for `scan-new` (useful for heavy samples)
18+
- `--timeout` option for `re-scan` (response waiting time for large traces)
19+
- `--amsi` and `--dex` download options for `scan`, `scan-new` and `download` commands
20+
- `--concurrency` and `--read-timeout` options for `download` command
21+
- `--query` and `--count` options for `download` command to search and download tasks
22+
- `--unimon-hooks`, `--fileextractor-excludes`, `--no-procdumps-on-finish`, `--disable-lightweight-dumps` and `--file-type-as-ext` options for `scan-new`
23+
- `--debug` download option for `re-scan`
24+
- `description` field in sandbox config
25+
- `rules-path` config option for specifying a base path to the rules directory
26+
- Support for task links in `download` command
27+
- Support for wildcard scan files on Windows
28+
29+
### Changed
30+
31+
- **Breaking:** `--procdump-new-processes-on-finish` renamed to `--no-procdumps-on-finish` (inverted semantics)
32+
- **Breaking:** `--latest` flag removed from `report` command
33+
- `email` command description changed from "Send an email" to "Upload an email"
34+
- `--rules` now accepts platform aliases (`windows`, `linux`) in addition to paths
35+
- `--crashdumps` short flag changed from `-c` to `-C` in `download` command
36+
- `report` command now supports download output without `scan_config.json`
37+
- `report --key` is now used only for link generation when `scan_config.json` is missing
38+
- CLI startup optimized via lazy command registration
39+
- Internal architecture refactored: `utils/``services/`, `internal/``core/`, split `_common.py` into focused modules
40+
41+
### Fixed
42+
43+
- Download race condition where concurrent downloads could overwrite files with the same name
44+
- Various typos in help texts and comments
45+
46+
## 0.2.50
47+
48+
### Fixed
49+
50+
- Don't clean last line in scanner output (was overriding results)
51+
- Resolve mypy type issues
52+
53+
## 0.2.49
54+
55+
### Added
56+
57+
- New parameter to fine-tune the scan (`--disable-lightweight-dumps`)
58+
59+
## 0.2.48
60+
61+
### Added
62+
63+
- New artifact types for download from sandbox (AMSI dumps, DEX dumps)
64+
- Wildcard support for scan files on Windows
65+
66+
## 0.2.47
67+
68+
### Added
69+
70+
- Internal improvements
71+
72+
## 0.2.46
73+
74+
### Added
75+
76+
- Save debug files on rescan
77+
- Remove "safe" suffix from the analysis filename
78+
79+
## 0.2.45
80+
81+
### Added
82+
83+
- Option to pass fileextractor excludes (`--fileextractor-excludes`)
84+
85+
## 0.2.44
86+
87+
### Added
88+
89+
- New scanner options (`--unimon-hooks`, `--no-procdumps-on-finish`, `--file-type-as-ext`)
90+
91+
## 0.2.43
92+
93+
### Added
94+
95+
- Shell completion command (`sandbox-cli completion`)
96+
97+
### Changed
98+
99+
- Refactor file names in unpack output
100+
101+
## 0.2.42
102+
103+
### Added
104+
105+
- Download any unknown artifact types
106+
107+
### Fixed
108+
109+
- Missing sandbox link in `md` report output
110+
111+
## 0.2.41
112+
113+
### Added
114+
115+
- Wait timeout option for scans (`--wait-timeout`)
116+
- Support for task links in download command
117+
118+
## 0.2.40
119+
120+
### Fixed
121+
122+
- Incorrect task parsing in download command
123+
124+
## 0.2.39
125+
126+
### Added
127+
128+
- Option to show suspicious detects in report (`--suspicious`)
129+
- Show elapsed time when scan is done
130+
- Show malware detects always on top
131+
132+
### Fixed
133+
134+
- Handle socket timeout error while downloading files
135+
8136
## 0.2.38
9137

10138
### Added

0 commit comments

Comments
 (0)