Commit graph

57 commits

Author SHA1 Message Date
Pedro Algarvio
53aafe7eba Bump to pyyaml==6.0.1 due to https://github.com/yaml/pyyaml/issues/601
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-07-18 14:21:40 +01:00
Pedro Algarvio
5b2e752d5e Bump to cryptography==41.0.2 to address GHSA-cf7p-gm2m-833m
The cryptography package before 41.0.2 for Python mishandles SSH certificates that have critical options.
References:

https://nvd.nist.gov/vuln/detail/CVE-2023-38325
[https://github.com/pyca/cryptography/issues/9207](pyca/cryptography#9207)
[https://github.com/pyca/cryptography/issues/9208](pyca/cryptography#9208)
[https://github.com/pyca/cryptography/compare/41.0.1...41.0.2](pyca/cryptography@41.0.1...41.0.2)
https://pypi.org/project/cryptography/#history
[1ca7adc97b](pyca/cryptography@1ca7adc)

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-07-16 17:44:45 -07:00
Pedro Algarvio
3d097b8ed5 Upgrade to cryptography==41.0.1(and therefor pyopenssl==23.2.0 due to https://github.com/advisories/GHSA-5cpq-8wj7-hf2v
This only really impacts pip installs of Salt and the windows onedir
since the linux and macos onedir build every package dependency from
source, not from pre-existing wheels.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-07-06 18:04:43 +01:00
Megan Wilhite
dc8baed208 Update requests 2023-05-29 18:08:57 +01:00
Twangboy
a32b2f82db Remove mako from Windows and MacOS 2023-04-04 08:33:30 +01:00
Pedro Algarvio
9a32f14e41 Upgrade to pyopenssl==23.0.0 due to the cryptography upgrade.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-03-22 15:08:20 +00:00
Pedro Algarvio
5e7d4e3021 Upgrade to cryptography>=39.0.1
Due to:
  * GHSA-x4qr-2fvf-3mr5
  * GHSA-w7pp-m8wf-vj6r

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-03-22 15:08:20 +00:00
MKLeb
463d97e95f Revert "Upgrade to cryptography==39.0.1"
This reverts commit 78fedf1656.
2023-02-24 07:20:18 +00:00
Pedro Algarvio
78fedf1656 Upgrade to cryptography==39.0.1
Due to:
  * https://github.com/advisories/GHSA-x4qr-2fvf-3mr5
  * https://github.com/advisories/GHSA-w7pp-m8wf-vj6r

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-02-23 05:49:08 +00:00
Pedro Algarvio
4b708715f2 Upgrade to werkzeug==2.2.3
This addresses:
  * https://github.com/advisories/GHSA-px8h-6qxv-m22q
  * https://github.com/advisories/GHSA-xg9f-g7g7-2323

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-02-23 05:49:08 +00:00
Pedro Algarvio
3fa827925f Fix pre-commit by changing the pyzmq requirements.
It's now `pyzmq>=20.0.0` on all platforms, and `<=22.0.3` just for windows.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-02-09 05:37:59 +00:00
Pedro Algarvio
cea048be5f Update docs related requirements
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-02-04 14:11:36 +00:00
Pedro Algarvio
6acef263b1 Stop triggering the jinja2.contextfunction deprecation warning
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-01-18 11:54:43 +00:00
Pedro Algarvio
5a0fd275eb Update setptoctitle requirements to stop getting the PY_SSIZE_T_CLEAN warning
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-01-18 11:54:43 +00:00
Pedro Algarvio
4ecfd3d3d5 Use packaging for version parsing. looseversion when needed only.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-01-09 12:31:51 -07:00
Pedro Algarvio
e47e47a7e6 Bump to gitpython==3.1.30 because of https://github.com/advisories/GHSA-hcpj-qp55-gfph
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-12-31 15:02:22 +00:00
David Murphy
75b1be30a6 Further cleanup, removed used of looseversion and packaging 2022-12-20 07:07:21 -07:00
David Murphy
e8441238e1 Initial removal usage of distutils and replacement with setuptools 2022-12-20 07:07:21 -07:00
Pedro Algarvio
7df5feb62b Bump to certifi>=2022.12.7
Follow up to https://github.com/saltstack/salt/pull/63284

See https://github.com/advisories/GHSA-43fp-rhv2-5gv8 for additional context.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-12-12 04:32:02 +00:00
MKLeb
58ec510d26
Merge tag 'v3005.1' into merge-forward/3005.1
Version 3005.1
2022-10-04 20:52:23 -04:00
Megan Wilhite
863df6de7e Update mako requirement to 1.2.2 2022-09-22 15:21:26 -07:00
Gareth J. Greenaway
20fb0beb38 package jmespath 2022-09-12 12:13:00 -07:00
Carlos Álvaro
748e3a37b5 fix: Update setproctitle version for Darwin 2022-09-01 13:33:16 -06:00
Megan Wilhite
fc7d0a9296
Merge freeze into master (#62438)
* fixes saltstack/salt#62372 unable to use random shuffle and sample functions as Jinja filters

* move random_shuffle and random_sample logic to utils

* static seed in tests seems to have shifted

* static seed in tests require hash module

* Change Tiamat to onedir in release notes

* Reinstate known issues

* Update release notes with onedir package support policy

* need to check the version of Netmiko python library and then import the exceptions from different locations depending on the result.

* Adding changelog.

* swap out if...else for double try...except.

* Remove extra fix we don't need anymore

* [Docs] include onedir system python note

* Update all platforms to use pycparser 2.21 or greater for Py 3.9 or higher, fixes fips fault with openssl v3.x

* Remove the PyObjC dependency

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>

* Add "<tiamat> python" subcommand to allow execution or arbitrary scripts via bundled Python runtime

* Document usage of bundled Python runtime for Client API

* Use explicit locals for custom script execution, handle exception in similar fashion as Python

* Remove old __file__ replacement

* Apply suggestions from code review

Co-authored-by: Pedro Algarvio <pedro@algarvio.me>

Co-authored-by: nicholasmhughes <nicholasmhughes@gmail.com>
Co-authored-by: Alyssa Rock <alyssa.rock@gmail.com>
Co-authored-by: Gareth J. Greenaway <gareth@saltstack.com>
Co-authored-by: Twangboy <leesh@vmware.com>
Co-authored-by: David Murphy < dmurphy@saltstack.com>
Co-authored-by: Pedro Algarvio <palgarvio@vmware.com>
Co-authored-by: Lukas Raska <lukas@raska.me>
Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
2022-08-08 11:27:10 -06:00
Pedro Algarvio
27e3745589 Remove the PyObjC dependency
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-08-08 05:03:07 +01:00
David Murphy
b63534c6e5 Update all platforms to use pycparser 2.21 or greater for Py 3.9 or higher, fixes fips fault with openssl v3.x 2022-08-05 09:05:38 -06:00
Pedro Algarvio
e3929c59d1 Bump to `pyzmq==23.2.0` for Python >=3.9
This way we can use wheel packages on Py3.10 instead of having it build
from source.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-07-10 09:42:59 +01:00
Pedro Algarvio
f6fd24f125 Upgrade some requirements
These requirements should be kept up-to-date as much as possible.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-06-06 07:18:12 -06:00
Pedro Algarvio
46e6416e5b Update to `python-gnupg==0.4.8`
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-04-08 09:10:15 -04:00
Megan Wilhite
fb3033f032 Use the correct Markup from jinja for each version 2022-03-30 15:28:41 -07:00
Pedro Algarvio
75ed972d72 Update requirements to address know security vulnerabilities
Closes #61516
Closes #61515
Closes #61514
Closes #61513
Closes #61520
Closes #61096
Closes #60944
Closes #61558
Closes #61559
Closes #61560
Closes #61561

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-02-08 06:34:43 -08:00
cmcmarrow
86d7c2dd05 fix pre 2021-09-24 20:20:32 -07:00
Pedro Algarvio
2ed6d1a974 Enforce requirements and their versions consistency
Use use the packaging requirements as version constraints to all other
requirements files which should include Salt's base requirements.

The nox sessions now don't install the base requirements since the "top"
requirements file includes the base requirements.

All of this, ensuring that the same versions are used on all of them.
2021-09-21 13:42:53 -07:00
Pedro Algarvio
bd7195c3c6 `importlib-metadata` is a packaging requirement instead.
This is so that timat builds will pull it in but we don't force
distributions to have that package available
2021-08-27 07:21:24 -04:00
Pedro Algarvio
2c6da2a5c5 Best salt-extensions load at runtime support is using `importlib-metadata` 2021-08-27 07:21:24 -04:00
Wayne Werner
3c578c4459
Bump pyzmq minimum to more than 19.0.2 (#60764)
At least under arm64 debian 11, python 3.9, 19.0.2 is buggy.

Closes #60671
2021-08-24 08:57:13 -07:00
Pedro Algarvio
a46aa3a55c Bump to `urllib3==1.26.6`
GHSA-q2q7-5pp4-w6pg

high severity

Vulnerable versions: < 1.26.5
Patched version: 1.26.5

Impact

When provided with a URL containing many @ characters in the authority component the authority regular expression exhibits
catastrophic backtracking causing a denial of service if a URL were passed as a parameter or redirected to via an HTTP redirect.

Patches

The issue has been fixed in urllib3 v1.26.5.

References

* [CVE-2021-33503](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33503)
* [JVNVU#92413403 (English)](https://jvn.jp/en/vu/JVNVU92413403/)
* [JVNVU#92413403 (Japanese)](https://jvn.jp/vu/JVNVU92413403/)
* [urllib3 v1.26.5](https://github.com/urllib3/urllib3/releases/tag/1.26.5)
2021-08-02 16:13:40 -07:00
Pedro Algarvio
ec6e96a036 Upgrade to six==1.16.0 to avoid problems on CI runs
```
13:59:02  nox > Session invoke-pre-commit was successful.
13:59:02  nox > Running session invoke-pre-commit
13:59:02  nox > pip install --progress-bar=off -r requirements/static/ci/py3.7/invoke.txt
13:59:02  Collecting blessings==1.7
13:59:02    Using cached blessings-1.7-py3-none-any.whl (18 kB)
13:59:02  Collecting invoke==1.4.1
13:59:02    Using cached invoke-1.4.1-py3-none-any.whl (210 kB)
13:59:02  Collecting pyyaml==5.3.1
13:59:02    Using cached PyYAML-5.3.1.tar.gz (269 kB)
13:59:02  Collecting six==1.15.0
13:59:02    Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
13:59:02  Building wheels for collected packages: pyyaml
13:59:02    Building wheel for pyyaml (setup.py) ... - \ | / - \ | done
13:59:02    Created wheel for pyyaml: filename=PyYAML-5.3.1-cp37-cp37m-linux_x86_64.whl size=546391 sha256=e42e1d66cc32087f4d33ceb81268c86b59f1a97029b19459f91b8d6ad1430167
13:59:02    Stored in directory: /var/jenkins/.cache/pip/wheels/5e/03/1e/e1e954795d6f35dfc7b637fe2277bff021303bd9570ecea653
13:59:02  Successfully built pyyaml
13:59:02  Installing collected packages: six, pyyaml, invoke, blessings
13:59:02    Attempting uninstall: six
13:59:02      Found existing installation: six 1.16.0
13:59:02      Uninstalling six-1.16.0:
13:59:02  ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/var/jenkins/.cache/pre-commit/repomw8oee1s/py_env-python3/lib/python3.7/site-packages/__pycache__/six.cpython-37.pyc'
13:59:02
13:59:02  nox > Command pip install --progress-bar=off -r requirements/static/ci/py3.7/invoke.txt failed with exit code 1
13:59:02  nox > Session invoke-pre-commit failed.
```
2021-05-27 09:32:39 -04:00
Pedro Algarvio
821dc29b3d Bump requirements to address a few security issues 2021-05-12 08:05:34 -04:00
Pedro Algarvio
2ea5ad81a9 Compile the requirements 2021-05-05 06:48:41 -07:00
Megan Wilhite
66cf74140b
Merge Freeze into Master (#60074)
* Merge 3002.6 bugfix changes (#59822)

* Pass `CI_RUN` as an environment variable to the test run.

This allows us to know if we're running the test suite under a CI
environment or not and adapt/adjust if needed

* Migrate `unit.setup` to PyTest

* Backport ae36b15 just for test_install.py

* Only skip tests on CI runs

* Always store git sha in _version.py during installation

* Fix PEP440 compliance.

The wheel metadata version 1.2 states that the package version MUST be
PEP440 compliant.

This means that instead of `3002.2-511-g033c53eccb`, the salt version
string should look like `3002.2+511.g033c53eccb`, a post release of
`3002.2` ahead by 511 commits with the git sha `033c53eccb`

* Fix and migrate `tests/unit/test_version.py` to PyTest

* Skip test if `easy_install` is not available

* We also need to be PEP440 compliant when there's no git history

* Allow extra_filerefs as sanitized kwargs for SSH client

* Fix regression on cmd.run when passing tuples as cmd

Co-authored-by: Alexander Graul <agraul@suse.com>

* Add unit tests to ensure cmd.run accepts tuples

* Add unit test to check for extra_filerefs on SSH opts

* Add changelog file

* Fix comment for test case

* Fix unit test to avoid failing on Windows

* Skip failing test on windows

* Fix test to work on Windows

* Add all ssh kwargs to sanitize_kwargs method

* Run pre-commit

* Fix pylint

* Fix cmdmod loglevel and module_names tests

* Fix pre-commit

* Skip ssh tests if binary does not exist

* Use setup_loader for cmdmod test

* Prevent argument injection in restartcheck

* Add changelog for restartcheck fix

* docs_3002.6

* Add back tests removed in merge

Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>
Co-authored-by: Bryce Larson <brycel@vmware.com>
Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
Co-authored-by: Alexander Graul <agraul@suse.com>
Co-authored-by: Frode Gundersen <fgundersen@saltstack.com>

* Remove glance state module in favor of glance_image

* update wording in changelog

* bump deprecation warning to Silicon.

* Updating warnutil version to Phosphorous.

* Update salt/modules/keystone.py

Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>

* Check $HOMEBREW_PREFIX when linking against libcrypto

When loading `libcrypto`, Salt checks for a Homebrew installation of `openssl`
at Homebrew's default prefix of `/usr/local`. However, on Apple Silicon Macs,
Homebrew's default installation prefix is `/opt/homebrew`. On all platforms,
the prefix is configurable.  If Salt doesn't find one of those `libcrypto`s,
it will fall back on the un-versioned `/usr/lib/libcrypto.dylib`, which will
cause the following crash:

    Application Specific Information:
    /usr/lib/libcrypto.dylib
    abort() called
    Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.

This commit checks $HOMEBREW_PREFIX instead of hard-coding `/usr/local`.

* Add test case

* Add changelog for 59808

* Add changelog entry

* Make _find_libcrypto fail on Big Sur if it can't find a library

Right now, if `_find_libcrypto` can't find any externally-managed versions of
libcrypto, it will fall back on the pre-Catalina un-versioned system libcrypto.
This does not exist on Big Sur and it would be better to raise an exception
here rather than crashing later when trying to open it.

* Update _find_libcrypto tests

This commit simplifies the unit tests for _find_libcrypto by mocking out the
host's filesystem and testing the common libcrypto installations (brew, ports,
etc.) on Big Sur. It simplifies the tests for falling back on system versions
of libcrypto on previous versions of macOS.

* Fix description of test_find_libcrypto_with_system_before_catalina

* Patch sys.platform for test_rsax931 tests

* modules/match: add missing "minion_id" in Pillar example

The documented Pillar example for `match.filter_by` lacks the `minion_id` parameter. Without it, the assignment won't work as expected.
- fix documentation
- add tests:
  - to prove the misbehavior of the documented example
  - to prove the proper behaviour when supplying `minion_id`
  - to ensure some misbehaviour observed with compound matchers doesn't occur

* Fix for issue #59773

- When instantiating the loader grab values of grains and pillars if
  they are NamedLoaderContext instances.
- The loader uses a copy of opts.
- Impliment deepcopy on NamedLoaderContext instances.

* Add changelog for #59773

* _get_initial_pillar function returns pillar

* Fix linter issues

* Clean up test

* Bump deprecation release for neutron

* Uncomment Sulfur release name

* Removing the _ext_nodes deprecation warning and alias.

* Adding changelog.

* Renaming changelog file.

* Update 59804.removed

* Initial pass at fips_mode config option

* Fix pre-commit

* Fix tests and add changelog

* update docs 3003

* update docs 3003 - newline

* Fix warts in changelog

* update releasenotes 3003

* add ubuntu-2004-amd64 m2crypto pycryptodome and tcp tests

* add distro_arch

* changing the cloud platforms file missed in 1a9b7be0e2

* Update __utils__ calls to import utils in azure

* Add changelog for 59744

* Fix azure unit tests and move to pytest

* Use contextvars from site-packages for thin

If a contextvars package exists one of the site-packages locations use
it for the generated thin tarball. This overrides python's builtin
contextvars and allows salt-ssh to work with python <=3.6 even when the
master's python is >3.6 (Fixes #59942)

* Add regression test for #59942

* Add changelog for #59942

* Update filemap to include test_py_versions

* Fix broken thin tests

* Always install the `contextvars` backport, even on Py3.7+

Without this change, salt-ssh cannot target systems with Python <= 3.6

* Use salt-factories to handle the container. Don't override default roster

* Fix thin tests on windows

* No need to use warn log level here

* Fix getsitepackages for old virtualenv versions

* Add explicit pyobjc reqs

* Add back the passthrough stuff

* Remove a line so pre-commit will run

* Bugfix release docs

* Bugfix release docs

* Removing pip-compile log files

* Fix failing test tests.unit.grains.test_core.CoreGrainsTestCase.test_xen_virtual

* Fix pre-commit for docs.txt reqs

Co-authored-by: Daniel Wozniak <dwozniak@saltstack.com>
Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
Co-authored-by: Bryce Larson <brycel@vmware.com>
Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
Co-authored-by: Alexander Graul <agraul@suse.com>
Co-authored-by: Frode Gundersen <fgundersen@saltstack.com>
Co-authored-by: Gareth J. Greenaway <gareth@saltstack.com>
Co-authored-by: Gareth J. Greenaway <gareth@wiked.org>
Co-authored-by: Hoa-Long Tam <hoalong@apple.com>
Co-authored-by: krionbsd <krion@freebsd.org>
Co-authored-by: Elias Probst <e.probst@ssc-services.de>
Co-authored-by: Daniel A. Wozniak <dwozniak@vmware.com>
Co-authored-by: Frode Gundersen <frogunder@gmail.com>
Co-authored-by: twangboy <slee@saltstack.com>
Co-authored-by: twangboy <leesh@vmware.com>
Co-authored-by: ScriptAutomate <derek@icanteven.io>
2021-04-27 11:47:47 -04:00
Pedro Algarvio
db49815052 Bump cryptography requirement to 3.3.2 due to CVE-2020-36242
Vulnerable versions: >= 3.1, < 3.3.2
Patched version: 3.3.2
Impact: When certain sequences of update() calls with large values (multiple GBs) for symetric encryption or decryption occur, it's possible for an integer overflow to happen, leading to mishandling of buffers.
References:
 - pyca/cryptography#5615

For Py3.5 requirements we dropped `cryptography` to version 3.0 which is not vulnerable to the CVE in question.
This decision was made consciously because the Salt Project creates packages for the supported distributions which still use Py3.5 and those even rely on an even older version of `cryptography`.
Upgrading to the latest version was not possible because the `cryptography` project dropped Py3.5 support.
2021-02-23 10:13:19 -05:00
Pedro Algarvio
12f0657306 Cleanup salt/_compat.py now that Salt is Py3.5+ only 2021-02-19 08:35:12 -05:00
Pedro Algarvio
92b7516f5a The GCE cloud driver only works with apache-libcloud>=2.5.0
Fixes #56862
2021-02-19 05:54:47 +00:00
Pedro Algarvio
dd40c41194 Only depend on the top level pyobjc requirement.
This was requested by the macOS team.

Refs https://github.com/saltstack/salt/issues/59023
2021-02-03 10:28:56 +00:00
Kirill Ponomarev
8973a9ac99
Upgrade msgpack to 1.0.2 (#59139)
* Upgrade msgpack to 1.0.1

* Update msgpack to 1.0.2

Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
2021-02-01 12:10:52 -05:00
Kirill Ponomarev
55076c91dc
Update cffi to 1.14.4 (#59124) 2021-01-19 10:01:31 -07:00
krionbsd
a3abf73afa Update psutil to 5.8.0 2021-01-13 20:42:29 +00:00
krionbsd
abe76a5a84 Update psutil to 5.7.3 2021-01-13 20:42:29 +00:00
Pedro Algarvio
6b942545af Concentrate common requirements in a single .in file 2021-01-13 11:25:46 +00:00