Skip to content

Commit

Permalink
Fix aiohttp vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbosch committed Nov 20, 2024
1 parent cf7e2ff commit 9db0516
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .project-creation/.skeleton/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
grpcio==1.64.1
protobuf==5.27.2
cloudevents==1.11.0
aiohttp==3.10.5
aiohttp==3.10.11
20 changes: 12 additions & 8 deletions .project-creation/.skeleton/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,39 @@
#
# pip-compile
#
aiohappyeyeballs==2.4.0
aiohappyeyeballs==2.4.3
# via aiohttp
aiohttp==3.10.5
aiohttp==3.10.11
# via -r requirements.in
aiosignal==1.3.1
# via aiohttp
async-timeout==4.0.3
async-timeout==5.0.1
# via aiohttp
attrs==24.2.0
# via aiohttp
cloudevents==1.11.0
# via -r requirements.in
deprecation==2.1.0
# via cloudevents
frozenlist==1.4.1
frozenlist==1.5.0
# via
# aiohttp
# aiosignal
grpcio==1.64.1
# via -r requirements.in
idna==3.8
idna==3.10
# via yarl
multidict==6.0.5
multidict==6.1.0
# via
# aiohttp
# yarl
packaging==24.1
packaging==24.2
# via deprecation
propcache==0.2.0
# via yarl
protobuf==5.27.2
# via -r requirements.in
yarl==1.9.7
typing-extensions==4.12.2
# via multidict
yarl==1.17.2
# via aiohttp
59 changes: 30 additions & 29 deletions NOTICE-3RD-PARTY-CONTENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@
## Python
| Dependency | Version | License |
|:-----------|:-------:|--------:|
|aiohappyeyeballs|2.4.0|Other/Proprietary License<br/>Python Software Foundation License|
|aiohttp|3.10.5|Apache 2.0|
|aiohappyeyeballs|2.4.3|Python Software Foundation License|
|aiohttp|3.10.11|Apache 2.0|
|aiosignal|1.3.1|Apache 2.0|
|APScheduler|3.10.4|MIT|
|async-timeout|4.0.3|Apache 2.0|
|async-timeout|5.0.1|Apache 2.0|
|attrs|24.2.0|MIT|
|build|1.2.1|MIT|
|build|1.2.2.post1|MIT|
|cachetools|5.5.0|MIT|
|cfgv|3.4.0|MIT|
|chardet|5.2.0|LGPL|
|click|8.1.7|New BSD|
|cloudevents|1.11.0|Apache 2.0|
|colorama|0.4.6|BSD|
|coverage|7.6.1|Apache 2.0|
|Deprecated|1.2.14|MIT|
|coverage|7.6.7|Apache 2.0|
|Deprecated|1.2.15|MIT|
|deprecation|2.1.0|Apache 2.0|
|distlib|0.3.8|Python Software Foundation License|
|distlib|0.3.9|Python Software Foundation License|
|exceptiongroup|1.2.2|MIT|
|filelock|3.15.4|The Unlicense (Unlicense)|
|frozenlist|1.4.1|Apache 2.0|
|filelock|3.16.1|The Unlicense (Unlicense)|
|frozenlist|1.5.0|Apache 2.0|
|grpc-stubs|1.53.0.5|MIT|
|grpcio|1.64.1|Apache 2.0|
|grpcio-tools|1.64.1|Apache 2.0|
|identify|2.6.0|MIT|
|idna|3.8|BSD|
|identify|2.6.2|MIT|
|idna|3.10|BSD|
|importlib-metadata|7.1.0|Apache 2.0|
|iniconfig|2.0.0|MIT|
|multidict|6.0.5|Apache 2.0|
|mypy|1.11.2|MIT|
|multidict|6.1.0|Apache 2.0|
|mypy|1.13.0|MIT|
|mypy-extensions|1.0.0|MIT|
|mypy-protobuf|3.6.0|Apache 2.0|
|nodeenv|1.9.1|BSD|
Expand All @@ -41,35 +41,36 @@
|opentelemetry-instrumentation-logging|0.46b0|Apache 2.0|
|opentelemetry-sdk|1.25.0|Apache 2.0|
|opentelemetry-semantic-conventions|0.46b0|Apache 2.0|
|packaging|24.1|Apache 2.0<br/>BSD|
|packaging|24.2|Apache 2.0<br/>BSD|
|paho-mqtt|2.1.0|OSI Approved|
|pip|23.0.1|MIT|
|pip-tools|7.4.1|BSD|
|platformdirs|4.2.2|MIT|
|platformdirs|4.3.6|MIT|
|pluggy|1.5.0|MIT|
|pre-commit|3.8.0|MIT|
|pre-commit|4.0.1|MIT|
|propcache|0.2.0|Apache 2.0|
|protobuf|5.27.2|Google License|
|pyproject-api|1.7.1|MIT|
|pyproject-hooks|1.1.0|MIT|
|pytest|8.3.2|MIT|
|pyproject-api|1.8.0|MIT|
|pyproject-hooks|1.2.0|MIT|
|pytest|8.3.3|MIT|
|pytest-asyncio|0.24.0|Apache 2.0|
|pytest-cov|5.0.0|MIT|
|pytz|2024.1|MIT|
|pytest-cov|6.0.0|MIT|
|pytz|2024.2|MIT|
|PyYAML|6.0.2|MIT|
|setuptools|65.5.1|MIT|
|six|1.16.0|MIT|
|tomli|2.0.1|MIT|
|tox|4.18.0|MIT|
|types-Deprecated|1.2.9.20240311|Apache 2.0|
|tomli|2.1.0|MIT|
|tox|4.23.2|MIT|
|types-Deprecated|1.2.15.20241117|Apache 2.0|
|types-mock|5.1.0.20240425|Apache 2.0|
|types-protobuf|5.27.0.20240626|Apache 2.0|
|types-protobuf|5.28.3.20241030|Apache 2.0|
|typing-extensions|4.12.2|Python Software Foundation License|
|tzlocal|5.2|MIT|
|virtualenv|20.26.3|MIT|
|wheel|0.44.0|MIT|
|virtualenv|20.27.1|MIT|
|wheel|0.45.0|MIT|
|wrapt|1.16.0|BSD|
|yarl|1.9.7|Apache 2.0|
|zipp|3.20.1|MIT|
|yarl|1.17.2|Apache 2.0|
|zipp|3.21.0|MIT|
## Workflows
| Dependency | Version | License |
|:-----------|:-------:|--------:|
Expand Down
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,62 @@ By default the examples are started using the native middleware. Dapr middleware
- [GitHub Issues](https://github.com/eclipse-velocitas/vehicle-app-python-sdk/issues)
- [Mailing List](https://accounts.eclipse.org/mailing-list/velocitas-dev)
- [Contribution](./CONTRIBUTING.md/)

### Creating a new release

1. Tag the commit and upload to GitHub

Create a tag of the form `vX.Y.X` and upload to the repository.
That will trigger the [release](https://github.com/eclipse-velocitas/vehicle-app-python-sdk/actions/workflows/release.yaml) workflow.
If the action is successfully executed a new [GitHub release](https://github.com/eclipse-velocitas/vehicle-app-python-sdk/releases) shall have been created as well as as
a new version of `velocitas-lib` published in [PyPI](https://pypi.org/project/velocitas-sdk/).

2. Update examples

This repository contain some requirement files that reference itself.
We cannot update the version numbers in those files until we have created a [PyPI](https://pypi.org/project/velocitas-sdk/) release, as Continuous Integration then will fail.
But that also means that a released version like `1.2.3` will contain references to an older version.

For now the best approach is to update them on `main` branch after we have created the release.
Update `velocitas-sdk` version number in the following files

* `.project-creation/.skeleton/requirements-velocitas.txt`
* `examples/seat-adjuster/requirements-velocitas.txt`

Use the version number used for the release.

2. Create a Pull Request and merge the updated version numbers

### Updating Dependencies

This repository specify exact Python versions in `setup.py` and other files.
If a version needs to be updated, for example if a vulnerability is detected, the following approach needs to be followed

1. Update version in `setup.py` if needed
2. Update generated requirement files.

```bash
pip-compile -U --extra=dev
```

3. Update version in `examples/seat-adjuster/requirements.in` if needed
4. Update generated file for Seat Adjuster

```bash
cd examples/seat-adjuster
pip-compile -U
```

5. Update version in `.project-creation/.skeleton/requirements.in` if needed
6. Update generated file for Skeleton

```bash
cd .project-creation/.skeleton/
pip-compile -U
```

7. Update `NOTICE-3RD-PARTY-CONTENT.md`

The easiest way to do it is to create a Pull Request.
Then the [check license workflow](https://github.com/eclipse-velocitas/vehicle-app-python-sdk/actions/workflows/check-licenses.yml) will fail as versions used no longer match versions stated in the file.
Copy output from the workflow to the `NOTICE-3RD-PARTY-CONTENT.md` file and update the Pull Request.
2 changes: 1 addition & 1 deletion examples/seat-adjuster/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
grpcio==1.64.1
protobuf==5.27.2
cloudevents==1.11.0
aiohttp==3.10.5
aiohttp==3.10.11
packaging==24.1
18 changes: 11 additions & 7 deletions examples/seat-adjuster/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,41 @@
#
# pip-compile
#
aiohappyeyeballs==2.4.0
aiohappyeyeballs==2.4.3
# via aiohttp
aiohttp==3.10.5
aiohttp==3.10.11
# via -r requirements.in
aiosignal==1.3.1
# via aiohttp
async-timeout==4.0.3
async-timeout==5.0.1
# via aiohttp
attrs==24.2.0
# via aiohttp
cloudevents==1.11.0
# via -r requirements.in
deprecation==2.1.0
# via cloudevents
frozenlist==1.4.1
frozenlist==1.5.0
# via
# aiohttp
# aiosignal
grpcio==1.64.1
# via -r requirements.in
idna==3.8
idna==3.10
# via yarl
multidict==6.0.5
multidict==6.1.0
# via
# aiohttp
# yarl
packaging==24.1
# via
# -r requirements.in
# deprecation
propcache==0.2.0
# via yarl
protobuf==5.27.2
# via -r requirements.in
yarl==1.9.7
typing-extensions==4.12.2
# via multidict
yarl==1.17.2
# via aiohttp
1 change: 0 additions & 1 deletion requirements-links.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
git+https://github.com/eclipse-velocitas/vehicle-model-python.git@v0.3.0
Loading

0 comments on commit 9db0516

Please sign in to comment.