Skip to content

Commit 4e0fa84

Browse files
initstringclaude
andauthored
Migrate to uv, drop setup.py, bump to v0.8 (#81)
* Migrate to uv, drop setup.py, bump to v0.8 - Replace setup.py and requirements.txt with pyproject.toml - Pin dependencies to current releases (dnspython>=2.8.0, requests>=2.34.2, requests-futures>=1.0.2) - Add [build-system] table for Debian packaging compatibility - Update CI to use astral-sh/setup-uv@v6 and uv run - Add release.yml workflow to auto-tag/release on version bump - Slim down .gitignore with uv-specific entries (exclude uv.lock) - Update README setup instructions to use uv Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix setuptools package discovery for manpage directory Explicitly set packages and py-modules to match old setup.py, preventing setuptools from erroring on the manpage/ directory during build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 13fefdb commit 4e0fa84

7 files changed

Lines changed: 103 additions & 145 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
41
name: Python application
52

63
on:
@@ -13,27 +10,19 @@ permissions:
1310
contents: read
1411

1512
jobs:
16-
build:
17-
13+
test:
1814
runs-on: ubuntu-latest
1915

2016
steps:
21-
- uses: actions/checkout@v3
22-
- name: Set up Python 3.10
23-
uses: actions/setup-python@v3
17+
- uses: actions/checkout@v4
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
2421
with:
25-
python-version: "3.10"
22+
enable-cache: true
23+
2624
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install flake8 pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31-
- name: Lint with flake8
32-
run: |
33-
# stop the build if there are Python syntax errors or undefined names
34-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
25+
run: uv sync
26+
3727
- name: Test with pytest
38-
run: |
39-
pytest
28+
run: uv run pytest

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
21+
with:
22+
enable-cache: true
23+
24+
- name: Read version from pyproject.toml
25+
id: version
26+
run: |
27+
VERSION=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
28+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
29+
30+
- name: Check if tag already exists
31+
id: tag_check
32+
run: |
33+
if git rev-parse "refs/tags/${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
34+
echo "exists=true" >> "$GITHUB_OUTPUT"
35+
else
36+
echo "exists=false" >> "$GITHUB_OUTPUT"
37+
fi
38+
39+
- name: Create tag and release
40+
if: steps.tag_check.outputs.exists == 'false'
41+
env:
42+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
run: |
44+
VERSION="${{ steps.version.outputs.version }}"
45+
git tag "$VERSION"
46+
git push origin "$VERSION"
47+
gh release create "$VERSION" \
48+
--title "Release $VERSION" \
49+
--generate-notes

.gitignore

Lines changed: 14 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,30 @@
1-
# Byte-compiled / optimized / DLL files
1+
# custom
2+
cloud-enum-output
3+
4+
# MacOS
5+
.DS_Store
6+
7+
# Python
28
__pycache__/
39
*.py[cod]
410
*$py.class
5-
6-
# C extensions
711
*.so
8-
9-
# Distribution / packaging
1012
.Python
1113
build/
12-
develop-eggs/
1314
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
2315
*.egg-info/
24-
.installed.cfg
25-
*.egg
26-
MANIFEST
27-
28-
# PyInstaller
29-
# Usually these files are written by a python script from a template
30-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31-
*.manifest
32-
*.spec
33-
34-
# Installer logs
35-
pip-log.txt
36-
pip-delete-this-directory.txt
37-
38-
# Unit test / coverage reports
39-
htmlcov/
40-
.tox/
16+
.pytest_cache/
4117
.coverage
4218
.coverage.*
43-
.cache
44-
nosetests.xml
4519
coverage.xml
46-
*.cover
20+
htmlcov/
21+
.tox/
22+
.nox/
4723
.hypothesis/
48-
.pytest_cache/
49-
50-
# Translations
51-
*.mo
52-
*.pot
53-
54-
# Django stuff:
55-
*.log
56-
local_settings.py
57-
db.sqlite3
58-
59-
# Flask stuff:
60-
instance/
61-
.webassets-cache
62-
63-
# Scrapy stuff:
64-
.scrapy
65-
66-
# Sphinx documentation
67-
docs/_build/
68-
69-
# PyBuilder
70-
target/
71-
72-
# Jupyter Notebook
73-
.ipynb_checkpoints
74-
75-
# pyenv
76-
.python-version
77-
78-
# celery beat schedule file
79-
celerybeat-schedule
80-
81-
# SageMath parsed files
82-
*.sage.py
83-
84-
# Environments
85-
.env
86-
.venv
87-
env/
88-
venv/
89-
ENV/
90-
env.bak/
91-
venv.bak/
92-
93-
# Spyder project settings
94-
.spyderproject
95-
.spyproject
96-
97-
# Rope project settings
98-
.ropeproject
99-
100-
# mkdocs documentation
101-
/site
10224

103-
# mypy
104-
.mypy_cache/
25+
# uv
26+
.venv/
27+
uv.lock
10528

10629
# vim swap files
10730
*.swp

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ See it in action in [Codingo](https://github.com/codingo)'s video demo [here](ht
4646
## Usage
4747

4848
### Setup
49-
Several non-standard libaries are required to support threaded HTTP requests and dns lookups. You'll need to install the requirements as follows:
49+
This project uses [uv](https://github.com/astral-sh/uv) for dependency management. Install uv, then run:
5050

5151
```sh
52-
pip3 install -r ./requirements.txt
52+
uv sync
5353
```
5454

5555
### Running
@@ -62,13 +62,13 @@ Keywords are mutated automatically using strings from `enum_tools/fuzz.txt` or a
6262
Let's say you were researching "somecompany" whose website is "somecompany.io" that makes a product called "blockchaindoohickey". You could run the tool like this:
6363

6464
```sh
65-
./cloud_enum.py -k somecompany -k somecompany.io -k blockchaindoohickey
65+
uv run cloud_enum -k somecompany -k somecompany.io -k blockchaindoohickey
6666
```
6767

6868
HTTP scraping and DNS lookups use 5 threads each by default. You can try increasing this, but eventually the cloud providers will rate limit you. Here is an example to increase to 10.
6969

7070
```sh
71-
./cloud_enum.py -k keyword -t 10
71+
uv run cloud_enum -k keyword -t 10
7272
```
7373

7474
**IMPORTANT**: Some resources (Azure Containers, GCP Functions) are discovered per-region. To save time scanning, there is a "REGIONS" variable defined in `cloudenum/azure_regions.py and cloudenum/gcp_regions.py` that is set by default to use only 1 region. You may want to look at these files and edit them to be relevant to your own work.

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[project]
2+
name = "cloud_enum"
3+
version = "0.8"
4+
description = "Multi-cloud OSINT tool. Enumerate public resources in AWS, Azure, and Google Cloud."
5+
requires-python = ">=3.10"
6+
dependencies = [
7+
"dnspython>=2.8.0",
8+
"requests>=2.34.2",
9+
"requests-futures>=1.0.2",
10+
]
11+
12+
[project.scripts]
13+
cloud_enum = "cloud_enum:main"
14+
15+
[dependency-groups]
16+
dev = [
17+
"pytest",
18+
]
19+
20+
[tool.setuptools]
21+
py-modules = ["cloud_enum"]
22+
packages = ["enum_tools"]
23+
24+
[build-system]
25+
requires = ["setuptools>=61"]
26+
build-backend = "setuptools.build_meta"

requirements.txt

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

setup.py

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

0 commit comments

Comments
 (0)