Граф коммитов

51 Коммитов

Автор SHA1 Сообщение Дата
AJ Bahnken 0c11a35287
fix install instructions (#400) 2020-10-23 12:50:32 -07:00
AJ Bahnken 5ae768c89b
Support for allowed ports for GCP firewall tests (#391)
* Support for allowed ports for GCP firewall tests

Adds support for allowed ports in GCP firewall tests

As well, switch from the term "whitelisted" to "allowed"

* Add comments about allowed_ports* config opts
2020-10-19 11:01:16 -07:00
Hal Wine ceab2ae40b
[DOC] Support Markdown in docs (#376) (#381)
* Support Markdown in documents

Uses `myst_parser` to process Markdown files in the Sphinx workflow.
Using that, included the top level `README.md` as the "Overview" in the
rendered docs.

Some tweaks were needed to have `README.md` render correctly in rendered
docs. Still renders okay via GitHub.

Add a makefile target `doc-preview` to serve the locally built docs.

Fix some links in the README file.

Co-authored-by: Sven Marnach <sven@mozilla.com>
2020-10-08 17:36:16 -07:00
Hal Wine 3c2e04b561
Revert "Add markdown support to our Sphinx docs (#374)"
Breaks document modification -- forgot to test in clean checkout :/
2020-10-04 10:11:29 -07:00
Hal Wine 7b759b95ea
Add markdown support to our Sphinx docs (#374)
* Add tooling to support Markdown pages

* Add top level README to docs

Co-authored-by: Hal Wine <hal@dtor.com>
2020-10-04 08:35:44 -07:00
Greg Guthe 047e338158
add --aws-regions cli arg (#354)
fixes: #348
2020-09-18 16:00:20 -07:00
AJ Bahnken 62a684cd71
Remove regression marking (#347) 2020-09-18 17:14:19 -04:00
Greg Guthe 282f6796e5
Dont err when cache disabled (#351)
* fix errors running with cache disabled

* readme: document disabling the cache
2020-09-18 17:13:55 -04:00
Greg Guthe 52409499ce
Fix 302 add cli bin (#341)
* setup.py: require python 3.8

* setup.py: add shebang

* add frost dir with VERSION and SOURCE_URL

* add click to requirements

* add frost module and pass through cli

* make: pytest -> frost test

* make: install as python package

* run pytest from the repo root directory

so we discover frost conftest and tests

* readme: update install directions and examples

* make: add test files to awsci target

* update dockerfile to install python package

* add requirements to setup.py

* bump version to 0.4.0

* make: remove python version check

setup.py specifies supported python versions

* ci: drop travis tests against python <3.8

* ci: drop travis ripgrep install

rg removed
2020-09-17 15:53:32 -04:00
Greg Guthe 9f14ba1dc3
default to not collecting any tests (#336)
fix: #311
2020-09-15 17:55:24 -04:00
Greg Guthe 650508b7df
readme: doc --gcp-project-id (#338) 2020-09-15 17:29:48 -04:00
Greg Guthe 9de9554383
update pytest and pytest plugins (#315)
* update pytest and pytest plugins

* conftest: add rationale and service markers

* s/get_marker/get_closest_marker/

> #4546: Remove Node.get_marker(name) the return value was not usable for more than a existence check.
>
> Use Node.get_closest_marker(name) as a replacement.

https://docs.pytest.org/en/6.0.2/changelog.html#pytest-4-1-0-2019-01-05

* replace removed _genid with nodeid

* aws: fix typo in iam_users_with_policies_and_groups docstring

Co-authored-by: Hal Wine <132412+hwine@users.noreply.github.com>

* add get_param_id to top level helpers

* handle test idfns failing with NotSetType for offline empty param lists

fix confusing pytest parmetrize doctest errors

* Fixes for pytest upgrade and new datetime parsing

* Create a new global for our CustomConfig obj
* Fix parameterize id calls where it's getting a list
* Use timezone info in datetime related tests

* Fix formatting + use get_param_id in redshift helpers

* switch ordering on rds id func for unit tests

Co-authored-by: Hal Wine <132412+hwine@users.noreply.github.com>
Co-authored-by: AJ Bahnken <aj@ajvb.me>
2020-09-15 15:20:38 -04:00
Greg Guthe dbeab0601b
readme: add logo (#322)
per @jvehent logo is licensed for public use
2020-08-06 10:39:45 -07:00
Greg Guthe 84ac92ae24
remove pagerduty client and tests (#314) 2020-08-03 13:02:30 -04:00
Greg Guthe 14ea3c77e4
Fix 302 containerize (#310)
* add Dockerfile

* make: add build-image

* ci: add circle config to push images

* update readme to use docker image
2020-07-30 16:24:26 -04:00
AJ Bahnken 552e0c8162
Complete renaming to 'frost' (#293) 2019-09-24 13:33:57 -07:00
Julien Vehent 3dcc7fdae4
Update README.md 2019-09-16 00:37:08 -04:00
AJ Bahnken 83b4dea8ca
Add test for publicly available ebs snapshots (#285) 2019-08-14 11:42:55 -07:00
AJ Bahnken 497790674b
Initial pass on refreshing GCP tests (#246)
Adds:
  * test_firewall_opens_all_ports_to_any
  * test_firewall_opens_any_ports_to_all
  * test_admin_service_accounts
  * test_sql_instance_private_ip_required
  * Initial GCP docs in README
Improve:
  * Fix error within conftest when no args are provided to pytest
  * Add error message to test_sql_instance_ssl_required
2019-05-01 22:48:13 +00:00
AJ Bahnken 8f29cc1467
Fix the concept of "admin" in aws iam tests (#152)
Originally, a user was an "admin" if they had a policy that included the
word "admin" in it. That kinda worked sometimes, but needed to be
replaced.

Now, in the config file you can list the admin policies and groups and a
user or role will be matched against these lists.
2018-09-28 11:53:48 -07:00
Greg Guthe 465ab1f356
Pagerduty bug 1471730 (#149)
* pagerduty: remove unused test_user_has_escalation_policy

* requirements: remove pygerduty

* pagerduty: switch to remote monitoring extension checks

* make: ignore pagerduty/ for doctests
2018-08-23 17:49:00 -04:00
AJ Bahnken a345046e53
Adding four missing AWS IAM policies for pytest services (#120) 2018-06-19 08:43:24 -07:00
AJ Bahnken 9613b05c19
Initial GSuite test (#103)
* Initial credential creation code for GSuite

* Initial GSuite setup + test

Adds the first Gsuite test plus all config code
required to make it work.

* Test related fixes

* Cleaned up test + added GSuite docs

* cr fix: remove [] from any() in pytest_configure
2018-03-23 13:33:34 -07:00
Greg Guthe 138caa8825
readme: rm --aws-regions; aws from --debug-calls (#101)
refs: https://github.com/mozilla-services/pytest-services/commit/401c88a and PR #100
2018-03-19 19:59:14 -04:00
AJ Bahnken 936974ea63
test_iam_user_is_inactive with config support (#99)
* test_iam_user_is_inactive with config support

Fixes #98

* Implemented code review suggestions
2018-03-06 13:48:28 -08:00
Greg Guthe 5f41931956
meta tests (#96)
* readme: document meta tests (for param fetching) file layout

* make: Add metatest target

* make: Add metatest against to doctest-coverage target

* make: rename doctest-coverage to the more accurate coverage

* Add some example_cache files

* Add example meta test

* fix flake8 errors in iam resource tests

* test iam_inline_policies
2018-03-05 14:16:42 -05:00
AJ Bahnken 6f25ef3a60
Adds new test for cross-account roles requiring MFA (#97)
* Initial pass at test for admin roles requiring MFA

* Fixed filename and added new policies needed

* Added disclaimers/notes about potential for false positives/negatives
2018-02-28 13:26:16 -08:00
AJ Bahnken bef7b75af3
Config refactor (#94)
* initial refactor to single custom config file

* further implemented regression into actual results

* some bug fixes

* fixed doctests for severity.py and exemptions.py

* initial pass at README for config refactor

* remove whitelisted_ports global

* Added doctest to regressions.py

* Removed --aws-require-tag and --aws-whitelisted-ports CLI opts

* Expanded upon the README of the new config file.

* minor README tweaks
2018-02-26 12:44:01 -08:00
AJ Bahnken 05cd08d62d
"Does 'Admin' user have access/secret keys" test (#90)
* Added support for dont_cache in botocoreclient.get

* Implemented test_iam_admin_user_with_access_key

* Add two new policy perms for pytest-services

* dont -> do_not

* Support doctests by doing len checks
2018-02-20 16:21:01 -08:00
AJ Bahnken 5a7d419905
Add additional whitelist opt for sg test (#89)
Fixes #88
2018-02-16 14:42:48 -08:00
AJ Bahnken 5060cfb62a Fix new policy 2018-02-12 13:31:45 -08:00
AJ Bahnken 7887e0967b Add new required policies to README 2018-02-12 13:24:00 -08:00
AJ Bahnken cfc65f6b20 Expanded upon documentation for regex matching 2018-02-09 10:24:25 -08:00
AJ Bahnken 1cf4a7737c Substring matching for exemptions test id's
Adds the ability to prefix a test id with an asterisk
to enable substring matching.

refs #67
2018-02-08 11:06:56 -08:00
AJ Bahnken b6bfe45609 Added s3:ListAllMyBuckets to default policy 2018-02-05 09:45:40 -08:00
AJ Bahnken c4c24352d3 Small typo fixes for policy 2018-02-05 09:08:39 -08:00
AJ Bahnken 6ab11ae80e Added default IAM policy for pytest-services 2018-02-02 14:40:29 -08:00
Greg Guthe 93e05b4f40
Add exemptions conf
fixes #18
2018-02-02 15:38:05 -05:00
Greg Guthe 9a9bde6ce3
readme: remove PD ignores from examples 2018-02-02 10:41:25 -05:00
Greg Guthe 3d8418c04a
readme: document custom CLI args 2018-02-02 10:35:58 -05:00
Greg Guthe 4f64851783
use nargs for multi value args
refs https://github.com/mozilla-services/pytest-services/issues/31
2018-01-31 15:26:48 -05:00
Greg Guthe 6a7b769fdf
add test severity config options
fixes #28
2018-01-31 11:23:46 -05:00
Greg Guthe 551fe39455
aws: Add ec2 instance required tag name test 2018-01-30 10:28:51 -05:00
AJ Bahnken 2a8e2e9b5c Updated README to include new helpers.py convention 2018-01-29 10:55:27 -08:00
Greg Guthe 8a603ce495
readme: add adding a test example 2018-01-15 17:55:42 +07:00
Greg Guthe 1f691850e2
readme: add dev docs 2018-01-15 17:55:42 +07:00
Greg Guthe d2590d34db
readme: document options for running 2018-01-15 17:55:42 +07:00
Greg Guthe 616ff47eb0
readme: update install directions 2018-01-15 17:55:42 +07:00
Greg Guthe d2a290046f
readme: update description 2018-01-15 17:55:41 +07:00
Greg Guthe bf96e6b71c
update readme 2017-11-02 10:42:08 -04:00