Commit Graph

45286 Commits (c404bd75ffa66a672b1fbf85fb46a5b3efbf326e)
 

Author SHA1 Message Date
Rick Elrod c404bd75ff New release v2.8.14 5 years ago
Rick Elrod eb1114a1b1
[tests] pin docker to <4.3.0 (#71193)
Change:
- New python docker lib wants a newer docker than we have in CI.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
David Shrewsbury f35e825440
[2.8] Sanitize URI module keys with no_log values (#70762) (#70822)
* Sanitize URI module keys with no_log values (#70762)

* Add sanitize_keys() to module_utils.

* More robust tests

* Revert 69653 change

* Allow list or dict

* fix pep8

* Sanitize lists within dict values

* words

* First pass at uri module

* Fix insane sanity tests

* fix integration tests

* Add changelog

* Remove unit test introduced in 69653

* Add ignore_keys param

* Sanitize all-the-things

* Ignore '_ansible*' keys

* cleanup

* Use module.no_log_values

* Avoid deep recursion issues by using deferred removal structure.

* Nit cleanups

* Add doc blurb

* spelling

* ci_complete

(cherry picked from commit bf98f031f3)

* update changelog for security_fixes

* Update 70762-sanitize-uri-keys.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod d73793fac7
Update integration tests to support rpmfluff-0.6 (#71155) (#71161)
Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Sloane Hertel 291f94934c
copy - redact 'content' from invocation in check mode (#71033) (#71069)
* sanitize copy module invocation secrets in check mode

(cherry picked from commit 991714b9d1)
5 years ago
Sam Doran 11738aed97
[stable-2.8] Change default file permissions so they are not world readable (#70221) (#70827)
* [stable-2.8] Change default file permissions so they are not world readable (#70221)

* Change default file permissions so they are not world readable

CVE-2020-1736

Set the default permissions for files we create with atomic_move() to 0o0660. Track
which files we create that did not exist and warn if the module supports 'mode'
and it was not specified and the module did not call set_mode_if_different(). This allows the user to take action and specify a mode rather than using the defaults.

A code audit is needed to find all instances of modules that call atomic_move()
but do not call set_mode_if_different(). The findings need to be documented in
a changelog since we are not warning. Warning in those instances would be frustrating
to the user since they have no way to change the module code.

- use a set for storing list of created files
- just check the argument spac and params rather than using another property
- improve the warning message to include the default permissions.
(cherry picked from commit 5260527c4a)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Fix service test

* Fix lamdba_policy test

* Fix aws_lamdba test

* Fix warning for new default permissions when mode is not specified (#70976)

Follow up to #70221
Related to #67794
CVE-2020-1736

When set_mode_if_different() is called with mode of 'None', ensure we issue
a warning about the change in default permissions.

Add integration tests to ensure the warning works properly.

* Fix tests
- actually use custom module 🤦‍♂️
- verify file permission on created files
- use remote_tmp_dir so we're ready for split controller
- improve test module so we can skip the call to set_fs_attributes_if_different()
- fix tests for CentOS 6

(cherry picked from commit dc79528cc6)

* Use new category in changelog fragments
5 years ago
Sam Doran b95e520602
[stable-2.8] Drop "rhui-" prefix from RHEL repositories in AMI (#71130) (#71133)
The repository names seem to have changed and no longer have the "rhui-" prefix.
(cherry picked from commit 6ac4439a6a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Abhijeet Kasurde 7b8a66f284
[2.8] debconf: add a note about no_log usage (#70755)
debconf module exposes sensitive information to logs, console.
Add a note to user about using no_log=True to hide such
information from console.

Fixes: #32386

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 84b4387702)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 9b9bc112d5)
5 years ago
Rick Elrod f6d5d548b7
Add ansible-releases@redhat.com to announce template (#70815)
Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Alicia Cozine d1b2f66e16
backport of PRs 64763 and 70849 (#71098)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
5 years ago
Alicia Cozine 8ec313a107
use security_fix category in changelogs (#71072)
(cherry picked from commit 3d5217b6d5)

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
5 years ago
Matt Clay 9c5663699f [stable-2.8] Cap pytest version to avoid relative import issue.
(cherry picked from commit 3a8ac62596)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sam Doran eb7597c5cb
[stable-2.8] Pin psutil version in pids test (#70716) 6 years ago
Sam Doran 9d7594c627
[stable-2.8] ansible_runner test - Add constraints (#70667) (#70671)
A recent updated to psutil, which is a dependency of ansible-runner, fails
to install on older versions of pip.

Commit with the breaking change:

  135628639b
(cherry picked from commit 9d27d7c8b1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Rick Elrod 00db64d370 Update Ansible release version to v2.8.13.post0. 6 years ago
Rick Elrod 0c89598b8a New release v2.8.13 6 years ago
Abhijeet Kasurde bff0724e9e
[2.8] pipe: update docs for Popen with shell=True usage (#70604)
pipe lookup plugin uses Popen with shell=True intentionally.
This is considered a security issue if user input is not validated.
Updated docs to reflect this information for the user. Also, added
Bandit B602 documentation link for further reading.

Fixes: #70159

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e5649ca3e8)
6 years ago
Martin Krizek 97d8a5d160
Remove deprecation for TRANSFORM_INVALID_GROUP_CHARS (#66650) (#69488)
Fixes #61889

(cherry picked from commit 6086ea62ee)
6 years ago
Matt Clay 0f96e7e4cf [stable-2.8] Default ansible-test provisioning to us-east-1.
Previously windows instances on Shippable would be automatically directed to us-east-2.
(cherry picked from commit 1cf26896c5)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay 9fa105f183 Remove Azure module tests from CI. 6 years ago
Rick Elrod 0923e156c1 pip tests, use py2 compat sampleproject fork
Change:
- sampleproject has gone py3 only. Use a py2 compatible fork.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
6 years ago
Sandra McCann 0b41e9b2f0
adds japanese translation as a version-switcher option (#70214) (#70216)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit 4a0f42923b)
6 years ago
Sam Doran b354b66c4b [stable-2.8] Pin version of netaddr and jmespath in filters test 6 years ago
Rick Elrod 14bcd3b7a3
yum - fix bug where enablerepo is not honored when disablerepo all (#66557) (#70085)
Fixes #66549

The inefficiency improvement
https://github.com/ansible/ansible/pull/63713 introduced a bug where
`enablerepo` was not being honored if combined with
`disablerepo="*"`. This fixes that issue.

Signed-off-by: Adam Miller <admiller@redhat.com>

Co-authored-by: Adam Miller <admiller@redhat.com>
6 years ago
Felix Fontein a0f80fc2da
Fix documentation of docker_host_info (it does not delete). (#69746) 6 years ago
Sam Doran 47256e921c
[stable-2.8] Pin Docker version at 19.03.1 (#69635) (#69646)
* [stable-2.8] Pin Docker version at 19.03.1
(cherry picked from commit fe941a4045)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* [stable-2.8] Pin docker-ce-cli version in tests (#69620)

Installing docker-ce has a dependency of docker-ce-cli. If the version of docker-ci-cli is not specified, it installs the latest version.

(cherry picked from commit 889da811d7)
6 years ago
Matt Clay 60a6f5905f Update Ansible release version to v2.8.12.post0. 6 years ago
Matt Clay f2c259b152 New release v2.8.12 6 years ago
Matt Clay 4cdbcc4ed9 Disable failing azure_rm_dnszone test.
The module requires updates to work with the current Azure API.
6 years ago
Jordan Borean 85dfb1f49a Fix win_psmodule and win_psrepository tests 6 years ago
Jacob Yundt bdc4c2a1c2 redfish_config: fix support for boolean BIOS attributes
Backport of ansible-collections/community.general#189 to stable-2.8

Currently the redfish_config module will convert boolean bios_attribute_value
settings to strings (type str). This will cause BMCs expecting booleans to
error out.

This PR will change the default type of bios_attribute_value to 'raw' in order
to support strings and booleans.

Fixes #68251
6 years ago
Andrew Klychkov e60adefb46 mysql_user: fix error No database selected 6 years ago
Abhijeet Kasurde 7b50ca633f [2.8] Docs: point inventory script to respective version
With collections migration, inventory scripts are moved from devel (2.10).
Point docs for inventory script to their respective version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Rick Elrod e022b0d578 Add RHEL 8.2 to CI
Change:
RHEL 8.2 GA was released this week, test it in CI instead of 8.1.

Test Plan:
CI

Signed-off-by: Rick Elrod <rick@elrod.me>
6 years ago
Rick Elrod 94751ef971 Enable dnf integration tests on CentOS 8
Change:
We were only testing dnf on RHEL previously.
Test on CentOS 8 as well.

Test Plan:
Ran locally in docker.

Signed-off-by: Rick Elrod <rick@elrod.me>
6 years ago
Rick Elrod 75c5c543cb [dnf] Make behavior/errors compatible for new DNF
Change:
Extend the logic for custom error handling in the dnf module, so that on
newer DNF (such as DNF that ships with modern Fedora 31 container
images, and ships with RHEL 8.2) we report errors consistently with
older DNF.

Test Plan:
Ran dnf integration tests against an old Fedora 31 container image and a
brand new Fedora 32 container image; tess passed on both.

Signed-off-by: Rick Elrod <rick@elrod.me>
6 years ago
Brian Coca 273d8538db document danger of kubectl options (#68195) 6 years ago
Rick Elrod 40969ff438 Fix incorrect CVE reference in changelog fragment
Change:
This corrects an incorrect CVE identifier in the changelog entry for
CVE-2020-1735.

Test Plan:
N/A

Tickets:
Refs #67793, #68720

Signed-off-by: Rick Elrod <rick@elrod.me>
6 years ago
Rick Elrod d9d236ff56 [stable-2.8] pip - Fix check_mode for prerelease packages (#68690)
* pip - Fix check_mode for prerelease packages

Fixes #68592.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 82c60db49b)

Co-authored-by: Rick Elrod <rick@elrod.me>
6 years ago
Matt Clay b02a996936 Update Ansible release version to v2.8.11.post0. 6 years ago
Matt Clay b9ebc0ceef New release v2.8.11 6 years ago
Brian Coca 6f75aa2664 fixed fetch traversal from slurp (#68720)
* fixed fetch traversal from slurp

  * ignore slurp result for dest
  * fixed naming when source is relative
  * added tests with fake slurp
  * moved existing role tests into runme.sh
  * normalized on action excepts
  * moved dest transform down to when needed
  * added is_subpath check

fixes #67793

CVE-2019-3828

(cherry picked from commit ba87c225cd)
6 years ago
Brian Coca 2a563514f0 safely use vault to edit secrets (#68644)
* when possible, use filedescriptors from mkstemp to avoid race
  * when using path strings, ensure we are always creating the file

CVE-2020-1740
Fixes #67798

Co-authored-by: samdoran
(cherry picked from commit 28f9fbdb5e)
6 years ago
Sloane Hertel e6199d768c
[2.8] CVE-2020-1746 - Remove the params module option from ldap_attr and ldap_entry (#68715)
* Remove the params module option from ldap_attr and ldap_entry

Module options that circumvent Ansible's option handling were disallowed
in:
https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html

Additionally, this particular usage can be insecure if bind_pw is set
this way as the password could end up in a logfile or displayed on
stdout.

Fixes CVE-2020-1746

(cherry picked from commit 0ff609f1bc)

* Fix formatting for option names

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Fix fail_json

* update sanity

* fix indentation error

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
6 years ago
Brian Coca 5eabf7bb93
prevent ansible_facts injection (#68431) (#68445)
* prevent ansible_facts injection (#68431)

- also only replace when needed
 - switched from replace to index
 - added test to verify bogus_facts are not accepted

CVE-2020-10684

(cherry picked from commit a9d2ceafe4)

* added to ignore
6 years ago
Brian Coca e1273b6faf fix vault temp file handling (#68433)
* fix vault tmpe file handling

 * use local temp dir instead of system temp
 * ensure each worker clears dataloader temp files
 * added test for dangling temp files
 * added notes to data loader

CVE-2020-10685

(cherry picked from commit 6452a82452)
6 years ago
Sloane Hertel 6c74a29870 subversion module - provide password securely when possible or warn (#67829)
* subversion module - provide password securely with svn command line option --password-from-stdin when possible, and provide a warning otherwise.
* Update lib/ansible/modules/source_control/subversion.py.
* Add a test.

Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit d91658ec0c)
6 years ago
Roman 0e433f3d8f
[backport/2.8/63280] acl: fix module failure if there're spaces in a path (#63280) (#63809)
* acl: fix module failure if there're spaces in a path (#63280)

* Make acl module to work with whitespaces in path

* Added a changelog fragment

* Add quotes to changelog fragment

(cherry picked from commit 504d76e956)

* Fix tests
6 years ago
Matt Martz 75a28fe35f [stable-2.8] Always set the discovered interpreter on the delegated host (#64906)
* Always set the discovered interpreter on the delegated host. Fixes #63180

* Make code a little more generic

* Move code into a function

* Implement some changes based on reviews

* Add changelog fragment
(cherry picked from commit 123c624)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Brian Coca 8251d9f4c2
avoid mkdir -p (#68921) (#68927)
* avoid mkdir -p (#68921)

* also consolidated temp dir name generation, added pid for more 'uniqness'
* generalize error message
* added notes about remote expansion

CVE-2020-1733
fixes #67791

(cherry picked from commit 8077d8e401)

* C
6 years ago