Skip to content

Compatibility with newest Python, Terraform versions + new features#103

Open
Ianyliu wants to merge 168 commits into28mm:masterfrom
Ianyliu:main
Open

Compatibility with newest Python, Terraform versions + new features#103
Ianyliu wants to merge 168 commits into28mm:masterfrom
Ianyliu:main

Conversation

@Ianyliu
Copy link
Copy Markdown

@Ianyliu Ianyliu commented Aug 16, 2022

I've been working on the improvements of this tool as a Cisco Technical Intern this summer.

Here are some of the major changes I've made:

  • Add compatibility with recent versions of Terraform, Python, and Python packages
  • Allow Blast Radius to run independent of any Terraform file/folder/installation. Just simply provide a DOT script (file upload/text input)
  • New functionality (on app)
    • Tabs. This enables infrastructure comparison from different Terraform plans from different people.
    • Print graph. Allows users to print graph directly. (TODO: Doesn't work all the time)
    • Upload DOT files to generate graphs. Upload .txt files with DOT script (copy and past terraform graph output into a text file.
    • Text input for DOT script.
  • UI enhancements. Updated color scheme to more closely follow the 60-30-10 rule.
  • Added an example for running Blast Radius on AWS EC2 via Terraform
  • Added an example for running Blast Radius on Kubernetes
  • Added 3 example DOT files in examples/ folder to test out the newest features I've added
  • Better error handling to notify user of the problem
  • Create new Docker repo
  • Updated Dockerfile and Docker image to implement aforementioned functionality and features.
  • Update Docker image to include multi-cpu architecture (ARM, AMD, etc.)
  • Updated README.md to include more information
  • Other changes: I've spend quite some time looking across different forks and pull requests from others like gruberdev, AshleyHollis, etc. to merge changes (haven't finished). Some them include, switching to pyhcl2, adding Terratests to Dockerfile, PowerShell scripts that run Blast Radius on Docker, allowing Blast Radius to run even if JSON data couldn't be parsed, etc.

You can test out my Docker image at https://hub.docker.com/repository/docker/ianyliu/blast-radius-fork/

Ianyliu and others added 30 commits August 8, 2022 17:40
In my previous repo, I accidentally committed the API_KEY and access key. I decided to delete the repository and start anew.
According to Terraform, "A module is a container for multiple resources that are used together.... The .tf files in your working directory when you run terraform plan or terraform apply together form the root module. "

Since Terraform must be init-ed before using, it can be assumed that the remote modules have been downloaded to .terraform/modules. If the filepath joined by Terraform.directory and "source" variable does not exist, we look for remote modules instead.
…n If JSON Data Loading Failed

If the JSON data could not be parsed, then error messages will notify the user instead of silently failing.

In addition, if there was an error loading JSON data, the viewer can still be accessed. (The graph will still be there but the JSON data and some of the mouse events + colorization will be absent.
This commit was retrieved from Jrc356 at 28mm@74ba708
Based on changes by obourdon at 28mm@3c27bda
Terratests are a way to automate testing for your infrastructure code. See https://terratest.gruntwork.io/ for more information.

This is an original commit by gruberdev
28mm@353045a
Merges commmit by gruberdev at 28mm@246eb35
According to Python3 documentation for collections module (https://docs.python.org/3.7/library/collections.html):
"Changed in version 3.3: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.7. Subsequently, they will be removed entirely."
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.1 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](pallets/jinja@2.10.1...2.11.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
BuildX is a Docker service that allows users to build Docker images for multi-cpu architectures (ARM, AMD64, etc.).
The purpose of adding a BASH script for running the Docker containers is to
1. Reduce complexity to run Docker containers (lots of flags and parameters omitted)
2. Allow users to add alias(es) so they can run Blast Radius as if there were no container (```blast-radius --serve```)
Moving the PowerShell Script to the PowerShell folder means the Dockerfile is no longer in the same relative location, so I updated it to refer back to the parent directory.
The conflict was caused by:
blastradius 0.1.25 depends on Jinja2==2.11.3
flask 2.1.2 depends on Jinja2>=3.0
@Ianyliu
Copy link
Copy Markdown
Author

Ianyliu commented Aug 14, 2024

@rquadling Could you please try again with my latest image from Docker? I've never seen this issue before so I'm not sure if I can fix it.

@rquadling
Copy link
Copy Markdown

@Ianyliu Thank you for this. Will try it out tomorrow (UK time).

Ianyliu and others added 10 commits October 4, 2024 19:32
Was about to run this in a coffee shop and realised it's binding to all
addresses by default :P

Not sure if worthwhile just making the default 127.0.0.1 as well, so
binding further is an explicit move. Happy to adjust, I think that'd
make sense to me as well but would be a breaking change
@rquadling
Copy link
Copy Markdown

Really sorry for the delay in replying. Just retried running ...

$ docker run --rm -it -p 5000:5000 -v $(pwd):/data:ro --security-opt apparmor:unconfined --cap-add=SYS_ADMIN  ianyliu/blast-radius-fork

- ecr_repos in modules/ecr_repo
╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "grouped_ecr_repos" (grouped-ecr.tf:45) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "tailscale_connection" (tailscale.tf:8) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "tailscale_zone_association" (tailscale.tf:23) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "grouped_ecr_repos" (grouped-ecr.tf:45) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "grouped_ecr_repos" (grouped-ecr.tf:45) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "tailscale_connection" (tailscale.tf:8) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "grouped_ecr_repos" (grouped-ecr.tf:45) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "tailscale_connection" (tailscale.tf:8) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

╷
│ Error: Error accessing remote module registry
│ 
│ Failed to retrieve available versions for module "tailscale_zone_association" (tailscale.tf:23) from app.terraform.io: error looking up module versions: 401 Unauthorized.
╵

The terraform plan has all worked.

I'm running this on a MacBook Pro M1 chipset.

dependabot Bot and others added 6 commits May 19, 2025 20:20
Bumps [setuptools](https://github.com/pypa/setuptools) from 70.0.0 to 78.1.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](pypa/setuptools@v70.0.0...v78.1.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 78.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [setuptools](https://github.com/pypa/setuptools) from 70.0.0 to
78.1.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pypa/setuptools/blob/main/NEWS.rst">setuptools's
changelog</a>.</em></p>
<blockquote>
<h1>v78.1.1</h1>
<h2>Bugfixes</h2>
<ul>
<li>More fully sanitized the filename in PackageIndex._download. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4946">#4946</a>)</li>
</ul>
<h1>v78.1.0</h1>
<h2>Features</h2>
<ul>
<li>Restore access to _get_vc_env with a warning. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4874">#4874</a>)</li>
</ul>
<h1>v78.0.2</h1>
<h2>Bugfixes</h2>
<ul>
<li>Postponed removals of deprecated dash-separated and uppercase fields
in <code>setup.cfg</code>.
All packages with deprecated configurations are advised to move before
2026. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4911">#4911</a>)</li>
</ul>
<h1>v78.0.1</h1>
<h2>Misc</h2>
<ul>
<li><a
href="https://redirect.github.com/pypa/setuptools/issues/4909">#4909</a></li>
</ul>
<h1>v78.0.0</h1>
<h2>Bugfixes</h2>
<ul>
<li>Reverted distutils changes that broke the monkey patching of command
classes. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4902">#4902</a>)</li>
</ul>
<h2>Deprecations and Removals</h2>
<ul>
<li>Setuptools no longer accepts options containing uppercase or dash
characters in <code>setup.cfg</code>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pypa/setuptools/commit/8e4868a036b7fae3208d16cb4e5fe6d63c3752df"><code>8e4868a</code></a>
Bump version: 78.1.0 → 78.1.1</li>
<li><a
href="https://github.com/pypa/setuptools/commit/100e9a61ad24d5a147ada57357425a8d40626d09"><code>100e9a6</code></a>
Merge pull request <a
href="https://redirect.github.com/pypa/setuptools/issues/4951">#4951</a></li>
<li><a
href="https://github.com/pypa/setuptools/commit/8faf1d7e0ca309983252e4f21837b73ee12e960f"><code>8faf1d7</code></a>
Add news fragment.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/2ca4a9fe4758fcd39d771d3d3a5b4840aacebdf7"><code>2ca4a9f</code></a>
Rely on re.sub to perform the decision in one expression.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/e409e8002932f2b86aae7b1abc8f8c2ebf96df2c"><code>e409e80</code></a>
Extract _sanitize method for sanitizing the filename.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/250a6d17978f9f6ac3ac887091f2d32886fbbb0b"><code>250a6d1</code></a>
Add a check to ensure the name resolves relative to the tmpdir.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/d8390feaa99091d1ba9626bec0e4ba7072fc507a"><code>d8390fe</code></a>
Extract _resolve_download_filename with test.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/4e1e89392de5cb405e7844cdc8b20fc2755dbaba"><code>4e1e893</code></a>
Merge <a
href="https://github.com/jaraco/skeleton">https://github.com/jaraco/skeleton</a></li>
<li><a
href="https://github.com/pypa/setuptools/commit/3a3144f0d2887fa37c06550f42a101e9eebd953a"><code>3a3144f</code></a>
Fix typo: <code>pyproject.license</code> -&gt;
<code>project.license</code> (<a
href="https://redirect.github.com/pypa/setuptools/issues/4931">#4931</a>)</li>
<li><a
href="https://github.com/pypa/setuptools/commit/d751068fd2627d6d8f1729e39cbcd8119049998f"><code>d751068</code></a>
Fix typo: pyproject.license -&gt; project.license</li>
<li>Additional commits viewable in <a
href="https://github.com/pypa/setuptools/compare/v70.0.0...v78.1.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=setuptools&package-manager=pip&previous-version=70.0.0&new-version=78.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/Ianyliu/blast-radius-fork/network/alerts).

</details>
Bumps [requests](https://github.com/psf/requests) from 2.32.0 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.0...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [requests](https://github.com/psf/requests) from 2.32.0 to 2.32.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/psf/requests/releases">requests's
releases</a>.</em></p>
<blockquote>
<h2>v2.32.4</h2>
<h2>2.32.4 (2025-06-10)</h2>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2024-47081 Fixed an issue where a maliciously crafted URL and
trusted
environment will retrieve credentials for the wrong hostname/machine
from a
netrc file. (<a
href="https://redirect.github.com/psf/requests/issues/6965">#6965</a>)</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Numerous documentation improvements</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Added support for pypy 3.11 for Linux and macOS. (<a
href="https://redirect.github.com/psf/requests/issues/6926">#6926</a>)</li>
<li>Dropped support for pypy 3.9 following its end of support. (<a
href="https://redirect.github.com/psf/requests/issues/6926">#6926</a>)</li>
</ul>
<h2>v2.32.3</h2>
<h2>2.32.3 (2024-05-29)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed bug breaking the ability to specify custom SSLContexts in
sub-classes of
HTTPAdapter. (<a
href="https://redirect.github.com/psf/requests/issues/6716">#6716</a>)</li>
<li>Fixed issue where Requests started failing to run on Python versions
compiled
without the <code>ssl</code> module. (<a
href="https://redirect.github.com/psf/requests/issues/6724">#6724</a>)</li>
</ul>
<h2>v2.32.2</h2>
<h2>2.32.2 (2024-05-21)</h2>
<p><strong>Deprecations</strong></p>
<ul>
<li>
<p>To provide a more stable migration for custom HTTPAdapters impacted
by the CVE changes in 2.32.0, we've renamed <code>_get_connection</code>
to
a new public API, <code>get_connection_with_tls_context</code>. Existing
custom
HTTPAdapters will need to migrate their code to use this new API.
<code>get_connection</code> is considered deprecated in all versions of
Requests&gt;=2.32.0.</p>
<p>A minimal (2-line) example has been provided in the linked PR to ease
migration, but we strongly urge users to evaluate if their custom
adapter
is subject to the same issue described in CVE-2024-35195. (<a
href="https://redirect.github.com/psf/requests/issues/6710">#6710</a>)</p>
</li>
</ul>
<h2>v2.32.1</h2>
<h2>2.32.1 (2024-05-20)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Add missing test certs to the sdist distributed on PyPI.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/psf/requests/blob/main/HISTORY.md">requests's
changelog</a>.</em></p>
<blockquote>
<h2>2.32.4 (2025-06-10)</h2>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2024-47081 Fixed an issue where a maliciously crafted URL and
trusted
environment will retrieve credentials for the wrong hostname/machine
from a
netrc file.</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Numerous documentation improvements</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Added support for pypy 3.11 for Linux and macOS.</li>
<li>Dropped support for pypy 3.9 following its end of support.</li>
</ul>
<h2>2.32.3 (2024-05-29)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed bug breaking the ability to specify custom SSLContexts in
sub-classes of
HTTPAdapter. (<a
href="https://redirect.github.com/psf/requests/issues/6716">#6716</a>)</li>
<li>Fixed issue where Requests started failing to run on Python versions
compiled
without the <code>ssl</code> module. (<a
href="https://redirect.github.com/psf/requests/issues/6724">#6724</a>)</li>
</ul>
<h2>2.32.2 (2024-05-21)</h2>
<p><strong>Deprecations</strong></p>
<ul>
<li>
<p>To provide a more stable migration for custom HTTPAdapters impacted
by the CVE changes in 2.32.0, we've renamed <code>_get_connection</code>
to
a new public API, <code>get_connection_with_tls_context</code>. Existing
custom
HTTPAdapters will need to migrate their code to use this new API.
<code>get_connection</code> is considered deprecated in all versions of
Requests&gt;=2.32.0.</p>
<p>A minimal (2-line) example has been provided in the linked PR to ease
migration, but we strongly urge users to evaluate if their custom
adapter
is subject to the same issue described in CVE-2024-35195. (<a
href="https://redirect.github.com/psf/requests/issues/6710">#6710</a>)</p>
</li>
</ul>
<h2>2.32.1 (2024-05-20)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Add missing test certs to the sdist distributed on PyPI.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/psf/requests/commit/021dc729f0b71a3030cefdbec7fb57a0e80a6cfd"><code>021dc72</code></a>
Polish up release tooling for last manual release</li>
<li><a
href="https://github.com/psf/requests/commit/821770e822a20a21b207b3907ea83878bda1d396"><code>821770e</code></a>
Bump version and add release notes for v2.32.4</li>
<li><a
href="https://github.com/psf/requests/commit/59f8aa2adf1d3d06bcbf7ce6b13743a1639a5401"><code>59f8aa2</code></a>
Add netrc file search information to authentication documentation (<a
href="https://redirect.github.com/psf/requests/issues/6876">#6876</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/5b4b64c3467fd7a3c03f91ee641aaa348b6bed3b"><code>5b4b64c</code></a>
Add more tests to prevent regression of CVE 2024 47081</li>
<li><a
href="https://github.com/psf/requests/commit/7bc45877a86192af77645e156eb3744f95b47dae"><code>7bc4587</code></a>
Add new test to check netrc auth leak (<a
href="https://redirect.github.com/psf/requests/issues/6962">#6962</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144ef"><code>96ba401</code></a>
Only use hostname to do netrc lookup instead of netloc</li>
<li><a
href="https://github.com/psf/requests/commit/7341690e842a23cf18ded0abd9229765fa88c4e2"><code>7341690</code></a>
Merge pull request <a
href="https://redirect.github.com/psf/requests/issues/6951">#6951</a>
from tswast/patch-1</li>
<li><a
href="https://github.com/psf/requests/commit/6716d7c9f29df636643fa2489f98890216525cb0"><code>6716d7c</code></a>
remove links</li>
<li><a
href="https://github.com/psf/requests/commit/a7e1c745dc23c18e836febd672416ed0c5d8d8ae"><code>a7e1c74</code></a>
Update docs/conf.py</li>
<li><a
href="https://github.com/psf/requests/commit/c799b8167a13416833ad3b4f3298261a477e826f"><code>c799b81</code></a>
docs: fix dead links to kenreitz.org</li>
<li>Additional commits viewable in <a
href="https://github.com/psf/requests/compare/v2.32.0...v2.32.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=requests&package-manager=pip&previous-version=2.32.0&new-version=2.32.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/Ianyliu/blast-radius-fork/network/alerts).

</details>
Bumps [requests](https://github.com/psf/requests) from 2.32.4 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.4...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [requests](https://github.com/psf/requests) from 2.32.4 to 2.33.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/psf/requests/releases">requests's
releases</a>.</em></p>
<blockquote>
<h2>v2.33.0</h2>
<h2>2.33.0 (2026-03-25)</h2>
<p><strong>Announcements</strong></p>
<ul>
<li>📣 Requests is adding inline types. If you have a typed code base
that uses Requests, please take a look at <a
href="https://redirect.github.com/psf/requests/issues/7271">#7271</a>.
Give it a try, and report any gaps or feedback you may have in the
issue. 📣</li>
</ul>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2026-25645 <code>requests.utils.extract_zipped_paths</code> now
extracts contents to a non-deterministic location to prevent malicious
file replacement. This does not affect default usage of Requests, only
applications calling the utility function directly.</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Migrated to a PEP 517 build system using setuptools. (<a
href="https://redirect.github.com/psf/requests/issues/7012">#7012</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed an issue where an empty netrc entry could cause malformed
authentication to be applied to Requests on Python 3.11+. (<a
href="https://redirect.github.com/psf/requests/issues/7205">#7205</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Dropped support for Python 3.9 following its end of support. (<a
href="https://redirect.github.com/psf/requests/issues/7196">#7196</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/M0d3v1"><code>@​M0d3v1</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/6865">psf/requests#6865</a></li>
<li><a href="https://github.com/aminvakil"><code>@​aminvakil</code></a>
made their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/7220">psf/requests#7220</a></li>
<li><a href="https://github.com/E8Price"><code>@​E8Price</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/6960">psf/requests#6960</a></li>
<li><a href="https://github.com/mitre88"><code>@​mitre88</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/7244">psf/requests#7244</a></li>
<li><a href="https://github.com/magsen"><code>@​magsen</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/6553">psf/requests#6553</a></li>
<li><a
href="https://github.com/Rohan5commit"><code>@​Rohan5commit</code></a>
made their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/7227">psf/requests#7227</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/psf/requests/blob/main/HISTORY.md#2330-2026-03-25">https://github.com/psf/requests/blob/main/HISTORY.md#2330-2026-03-25</a></p>
<h2>v2.32.5</h2>
<h2>2.32.5 (2025-08-18)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>The SSLContext caching feature originally introduced in 2.32.0 has
created
a new class of issues in Requests that have had negative impact across a
number
of use cases. The Requests team has decided to revert this feature as
long term
maintenance of it is proving to be unsustainable in its current
iteration.</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Added support for Python 3.14.</li>
<li>Dropped support for Python 3.8 following its end of support.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/psf/requests/blob/main/HISTORY.md">requests's
changelog</a>.</em></p>
<blockquote>
<h2>2.33.0 (2026-03-25)</h2>
<p><strong>Announcements</strong></p>
<ul>
<li>📣 Requests is adding inline types. If you have a typed code base
that
uses Requests, please take a look at <a
href="https://redirect.github.com/psf/requests/issues/7271">#7271</a>.
Give it a try, and report
any gaps or feedback you may have in the issue. 📣</li>
</ul>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2026-25645 <code>requests.utils.extract_zipped_paths</code> now
extracts
contents to a non-deterministic location to prevent malicious file
replacement. This does not affect default usage of Requests, only
applications calling the utility function directly.</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Migrated to a PEP 517 build system using setuptools. (<a
href="https://redirect.github.com/psf/requests/issues/7012">#7012</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed an issue where an empty netrc entry could cause
malformed authentication to be applied to Requests on
Python 3.11+. (<a
href="https://redirect.github.com/psf/requests/issues/7205">#7205</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Dropped support for Python 3.9 following its end of support. (<a
href="https://redirect.github.com/psf/requests/issues/7196">#7196</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
<h2>2.32.5 (2025-08-18)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>The SSLContext caching feature originally introduced in 2.32.0 has
created
a new class of issues in Requests that have had negative impact across a
number
of use cases. The Requests team has decided to revert this feature as
long term
maintenance of it is proving to be unsustainable in its current
iteration.</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Added support for Python 3.14.</li>
<li>Dropped support for Python 3.8 following its end of support.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/psf/requests/commit/bc04dfd6dad4cb02cd92f5daa81eb562d280a761"><code>bc04dfd</code></a>
v2.33.0</li>
<li><a
href="https://github.com/psf/requests/commit/66d21cb07bd6255b1280291c4fafb71803cdb3b7"><code>66d21cb</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/psf/requests/commit/8b9bc8fc0f63be84602387913c4b689f19efd028"><code>8b9bc8f</code></a>
Move badges to top of README (<a
href="https://redirect.github.com/psf/requests/issues/7293">#7293</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/e331a288f369973f5de0ec8901c94cae4fa87286"><code>e331a28</code></a>
Remove unused extraction call (<a
href="https://redirect.github.com/psf/requests/issues/7292">#7292</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/753fd08c5eacce0aa0df73fe47e49525c67e0a29"><code>753fd08</code></a>
docs: fix FAQ grammar in httplib2 example</li>
<li><a
href="https://github.com/psf/requests/commit/774a0b837a194ee885d4fdd9ca947900cc3daf71"><code>774a0b8</code></a>
docs(socks): same block as other sections</li>
<li><a
href="https://github.com/psf/requests/commit/9c72a41bec8597f948c9d8caa5dc3f12273b3303"><code>9c72a41</code></a>
Bump github/codeql-action from 4.33.0 to 4.34.1</li>
<li><a
href="https://github.com/psf/requests/commit/ebf71906798ec82f34e07d3168f8b8aecaf8a3be"><code>ebf7190</code></a>
Bump github/codeql-action from 4.32.0 to 4.33.0</li>
<li><a
href="https://github.com/psf/requests/commit/0e4ae38f0c93d4f92a96c774bd52c069d12a4798"><code>0e4ae38</code></a>
docs: exclude Response.is_permanent_redirect from API docs (<a
href="https://redirect.github.com/psf/requests/issues/7244">#7244</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/d568f47278492e630cc990a259047c67991d007a"><code>d568f47</code></a>
docs: clarify Quickstart POST example (<a
href="https://redirect.github.com/psf/requests/issues/6960">#6960</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/psf/requests/compare/v2.32.4...v2.33.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=requests&package-manager=pip&previous-version=2.32.4&new-version=2.33.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/Ianyliu/blast-radius-fork/network/alerts).

</details>
Copilot AI review requested due to automatic review settings March 30, 2026 03:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Blast Radius fork for newer Python/Terraform ecosystems and expands the web UI to support DOT-only usage (no Terraform project required) with multi-graph/tab workflows.

Changes:

  • Updated Python/Terraform/Docker dependencies and packaging to target newer versions and include static assets.
  • Added DOT upload + text input flows and tabbed multi-graph UI features (upload, print, spinner/overlay, etc.).
  • Added expanded docs/examples plus Docker/Kubernetes helper assets and CI security workflows.

Reviewed changes

Copilot reviewed 32 out of 37 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
setup.py Adjust package discovery exclusions and include package data.
requirements.txt Bump/pin Python dependencies (Flask/Jinja2/requests, add python-hcl2, etc.).
examples/Example1.txt Add sample DOT graph for new upload/input features.
examples/Example2.txt Add sample DOT graph for new upload/input features.
examples/Example3.txt Add large sample DOT graph for new upload/input features.
docker-entrypoint.sh Improve env var defaults, add optional -chdir init, print build output.
doc/embedded.md Minor wording/formatting updates for embedding docs.
blastradius/util.py Update collections import for newer Python compatibility.
blastradius/server/templates/non_tf_dir.html New “no Terraform dir” UI template enabling DOT-only mode.
blastradius/server/templates/index.html Reworked main UI: tabs, upload/input, print, spinner overlay.
blastradius/server/templates/error.html Improve error page diagnostics with templated install checks.
blastradius/server/static/js/blast-radius.js Major UI/behavior additions: tabs, upload/input handlers, print, JSON-less handling attempts.
blastradius/server/static/css/style.css Add spinner/overlay styling and tab UI styling.
blastradius/server/server.py Add DOT upload/input endpoints and conditional rendering for non-Terraform mode.
blastradius/handlers/terraform.py Switch to python-hcl2 parsing and adjust module discovery logic.
blastradius/handlers/dot.py Regex tweak for module label parsing.
bin/blast-radius Add --host flag and adjust serve behavior.
README.md Major documentation overhaul (usage, Docker/K8s quickstarts, feature list).
PowerShell/docker_run.ps1 Add helper script to run the Docker image.
PowerShell/docker_build.ps1 Add helper script to build Docker image (and optional buildx notes).
Makefile Update Docker image name for build/publish targets.
Kubernetes/k8-blast-radius-service.yaml Add K8s Service manifest.
Kubernetes/k8-blast-radius-deployment.yaml Add K8s Deployment manifest for running Blast Radius.
Dockerfile Update Terraform/Python versions, add git, add build-time smoke-ish step.
Docker/docker-compose.yml Update compose version and Docker image reference.
Docker.md Add detailed Docker usage/build documentation.
BASH/docker_run.sh Add bash helper to build/run image with params.
BASH/docker_build.sh Add bash helper to build (and optional buildx multi-arch).
AWS/blast-radius-aws.tf Add AWS EC2 Terraform example to generate/use graphs.
.gitignore Ignore IDE dirs, Terraform outputs, macOS artifacts, etc.
.github/workflows/dependency-review.yml Add dependency review workflow.
.github/workflows/codesee-arch-diagram.yml Add CodeSee architecture diagram workflow.
.github/workflows/codeql.yml Add CodeQL scanning workflow.
.github/workflows/codeql-analysis.yml Add second CodeQL workflow (duplicate config).
.dockerignore Expand dockerignore rules and exclude large example/doc artifacts from builds.
Comments suppressed due to low confidence (1)

blastradius/server/server.py:218

  • initalizeDotGraph() always instantiates Terraform(os.getcwd()) and populates node.definition. This makes the new “DOT-only / no-Terraform-directory” mode depend on successfully parsing local .tf files, and will raise if any .tf file fails to parse (see Terraform.init). Consider wrapping Terraform parsing in a try/except and leaving definition empty when parsing fails or when no .tf files are present.
    if module_depth is not None and module_depth >= 0:
        dot.set_module_depth(module_depth)

    tf = Terraform(os.getcwd())
    for node in dot.nodes:
        node.definition = tf.get_def(node)


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

template = 'index.html'

#Run Blast Radius presenting a default graph
return render_template(template, help=get_help(), folder_name=folder_name)
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index() always calls get_help(), but get_help() runs terraform --version. When Terraform isn't installed (the new supported mode), this will raise (FileNotFoundError) before the non-Terraform template can render. Consider making get_help() resilient (e.g., return placeholders when terraform isn't found) or only call it when is_terraform_installation is true.

Suggested change
return render_template(template, help=get_help(), folder_name=folder_name)
help_data = get_help() if is_terraform_installation else {}
return render_template(template, help=help_data, folder_name=folder_name)

Copilot uses AI. Check for mistakes.
Comment on lines +258 to +260
completed2 = subprocess.run(
['python', '--version'], stdout=subprocess.PIPE)
if completed2.returncode != 0:
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_python_version() falls back to python --version into completed2, but the return value still reads from completed.stdout. This will return an empty/incorrect version string when python3 is missing. Return completed2.stdout in the fallback case (or unify into a single variable).

Suggested change
completed2 = subprocess.run(
['python', '--version'], stdout=subprocess.PIPE)
if completed2.returncode != 0:
completed = subprocess.run(
['python', '--version'], stdout=subprocess.PIPE)
if completed.returncode != 0:

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +95
if re.match(r'.*\/(\/.*)(?!:)', source):
path = os.path.join(path, match.groups()[0])

self.modules = Terraform(directory=path, settings=mod)
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the remote-module branch, self.modules = Terraform(...) overwrites the self.modules dict with a Terraform instance. This breaks subsequent lookups like self.modules[...] in get_def(). This should likely be self.modules[name] = Terraform(...) (and only after verifying the module directory exists).

Suggested change
if re.match(r'.*\/(\/.*)(?!:)', source):
path = os.path.join(path, match.groups()[0])
self.modules = Terraform(directory=path, settings=mod)
if match:
path = os.path.join(path, match.groups()[0])
if os.path.exists(path):
self.modules[name] = Terraform(directory=path, settings=mod)

Copilot uses AI. Check for mistakes.
Comment on lines 370 to 375
data.nodes.forEach(function (node) {
if (!(node.type in resource_groups))
console.log(node.type)
if (node.label == '[root] root') { // FIXME: w/ tf 0.11.2, resource_name not set by server.
node.resource_name = 'root';
}
if (node.label === '[root] root') { // FIXME: w/ tf 0.11.2, resource_name not set by server.
node.resource_name = 'root';
}
node.group = (node.type in resource_groups) ? resource_groups[node.type] : -1;
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing braces change the control flow in data.nodes.forEach(...): the [root] root special-case assignment is now nested under if (!(node.type in resource_groups)), so it won't run for node types that are in resource_groups. Add braces or move the root check out so it always applies to the root node.

Copilot uses AI. Check for mistakes.

'<div class="dropdown-item form-check">' +
'<label class="form-check-label">' +
'<input class="form-check-input" type="checkbox" value="" class="graph-tooltip-json" id="' + graphSelector + '-tooltip-json"' +
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTML string for the JSON tooltip checkbox includes two class attributes on the same <input> element (class="form-check-input" ... class="graph-tooltip-json"). Only one will be applied, which can break styling/selector logic. Merge these into a single class attribute.

Suggested change
'<input class="form-check-input" type="checkbox" value="" class="graph-tooltip-json" id="' + graphSelector + '-tooltip-json"' +
'<input class="form-check-input graph-tooltip-json" type="checkbox" value="" id="' + graphSelector + '-tooltip-json"' +

Copilot uses AI. Check for mistakes.
Comment thread docker-entrypoint.sh
Comment on lines 40 to +42
# it's possible that we're in a sub-directory. leave.
cd /data-rw
cat /output.txt
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker-entrypoint.sh runs with set -e and unconditionally cat /output.txt. If /output.txt isn't present (e.g., when the Dockerfile’s test lines are commented out as suggested), the entrypoint will exit and the container won't start. Guard this (e.g., if [ -f /output.txt ]; then ...; fi).

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +12
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>


Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This template includes both a bundled jQuery (/static/js/jquery.slim.min.js) and a second copy loaded from a CDN. Loading jQuery twice can cause plugin/handler issues, and the CDN script is not pinned with SRI/integrity. Prefer a single source (ideally the vendored one) and add integrity/crossorigin if a CDN is required.

Suggested change
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>

Copilot uses AI. Check for mistakes.
Comment on lines 355 to 368
d3.json(json_url, function (error, data) {

if (uploadJSON !== null) {
data = uploadJSON
}

if (error) {
console.error("No Terraform files were found, so JSON details will not be available. The graph is still usable but without all features enabled such as filtering content");
// alert("No Terraform files were found, so JSON details will not be available. The graph is still usable but without all features enabled such as filtering content");
}

// if (!error) {
var edges = data.edges;
var svg_nodes = [];
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The d3.json() callback logs error but then continues and immediately dereferences data.edges / data.nodes. If the JSON request fails (the case you're trying to support), data can be null/undefined and this will throw, preventing DOT-only graphs from rendering. If error is set, return early or set data = {nodes: [], edges: []} and disable JSON-dependent features.

Copilot uses AI. Check for mistakes.
<script src="/static/js/jquery.slim.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
<script src="/static/js/fontawesome-all.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This template includes both a bundled jQuery (/static/js/jquery.slim.min.js) and a second copy loaded from a CDN. Loading jQuery twice can cause plugin/handler issues, and the CDN script is not pinned with SRI/integrity. Prefer a single source (ideally the vendored one) and add integrity/crossorigin if a CDN is required.

Suggested change
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +19
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two CodeQL workflows (codeql.yml and codeql-analysis.yml) with the same name: "CodeQL" and nearly identical configuration. This will run CodeQL twice on the same events and can be confusing/noisy. Consider deleting one file or consolidating schedules into a single workflow.

Suggested change
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
name: "CodeQL (scheduled)"
on:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants