You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/docs/docsite/rst
Sam Doran 0199b1cf05
[stable-2.9] Change default file permissions so they are not world readable (#70221) (#70825)
* [stable-2.9] 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 jboss 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
..
api link from API stub page to module_utils page (#49831) 7 years ago
community Update Molecule support contact (#70797) (#70805) 6 years ago
dev_guide [backport][2.9][PR #70446] Refactor Python API examples and docs (#70851) 5 years ago
galaxy Backport of 67645 docs/docsite/rst/: fix typos (#67649) 6 years ago
images Adds custom 404 with cowsay image (#57422) 7 years ago
installation_guide [backport][2.9]Add note that devel branch should not be used in real environments (#… (#67494) 6 years ago
inventory Add implicit localhost hostvars note (#61956) 6 years ago
network Add platform guide for FRR (#69773) (#70067) 6 years ago
plugins Backport of 67645 docs/docsite/rst/: fix typos (#67649) 6 years ago
porting_guides [stable-2.9] Change default file permissions so they are not world readable (#70221) (#70825) 5 years ago
reference_appendices Allow tasks to notify a fqcn handler name (#68213) (#70074) 6 years ago
roadmap remove toshio as release manager (boohoo) (#64685) (#64740) 6 years ago
scenario_guides Backport of 67645 docs/docsite/rst/: fix typos (#67649) 6 years ago
shared_snippets [stable-2.9] Update example requirements file docs (#67626) (#67714) 6 years ago
user_guide [2.9] Docs: point inventory script to respective version 6 years ago
404.rst removes link from 404 content, explains options (#57971) 7 years ago
conf.py adds japanese translation as a version-switcher option (#70214) (#70217) 6 years ago
index.rst Backport/2.9/docs (#64073) 6 years ago