Bindep is a tool for checking the presence of binary packages needed
to use an application / library. It started life as a way to make it
easier to set up a development environment for OpenStack projects.
Change-Id: I1a6cfa255a6473febf0fb7b7d4f1bf8ca32d02c2
Depends-On: https://review.openstack.org/563717
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: Ifb4030c25ebc3342da15c8c903d8fd22fe743586
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I85d256e9e66bbf940f5b645c4a887b1f2a3707de
This change migrates the testing suite from using ostestr and testr
to using stester. Also cleaned up a missing space from tox.ini.
Change-Id: I886401a1efce6cb617a4db7a90ec9454bbea1d71
Some of the available checks are diskabled by default, like:
[H106] Don't put vim configuration in source files;
[H203] Use assertIs(Not)None to check for None.
Change-Id: Ib822b3b4cb9ae1176a8d69bbc0ab45126adc1bab
* Consistently use single space after period, not double
* Keep line width at 80 where possible
* Replace Pythion 3.4 references with 3.5 since the gate no longer
tests 3.4.
Change-Id: Ia6a1b9a5582f37e359b069b4a97f7c180e32ab3a
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove bandit.
Change-Id: Id9826953ea4f63702af427c0170c235afb91abaf
There is no this directory openstack/common which was used
to keep codes from oslo-incubator, we have retired oslo-incubator.
Removing openstack/commonfrom all OpenStack code in favor of the
Oslo libraries is a project wide goal for the Ocata release. So
don't use this directory any more. We should drop it for improving
searching efficiency.
Change-Id: I090fd6ab7e382868b8e782b6b9a9ab81ecbe8f85
* Constants should be in caps
* Redundant ( ) in if statements
* Use isinstance instead of type ==
* Indentation
Change-Id: I79fda14112a9dd02fe867f6d850762216e0ca9a1
Coverage combine deletes reports and thus jenkins failed
saying `no data to report`, this change fixes it.
Change-Id: Ia95ec755513d4382f9ad945e9688836445aee4d3
Soon the gate jobs will support Python 3.5. This patch adds the
tox virtualenv in preparation for the move from 3.4 to 3.5.
Change-Id: Ifda38d02f97510f7687924e83b4c7b01c28bf10b
Allows a user to run tests in debug mode for bandit, which can be very
helpful. This requires oslotest as a dependency, which has been added
as a test requirement.
Change-Id: I1614ebf2afff87a1e9b6d66e0abaa7b203234afc
When a development environment is under a proxy, tox fails even
when the environment variables are set.
This patch fixes the problem by passing them on to the env.
Change-Id: I903a023918d48e4cd9625576522c4df7d118949b
Closes-Bug: #1465086
According to the PTI (=Python Test Interface,
http://governance.openstack.org/reference/cti/python_cti.html), pep8
is the interface for codestyle checks. Move all tests from linters to
pep8.
This change will be followed by a change to project-config to use pep8
for testing in the gate.
Note that the deps line is not needed, pep8 will use the default
environment.
Change-Id: I791b6f6e073e316e4e11867493647c917350eb4f
H104 checks that empty files do not contain license headers. This
patch enables that check and fixes a couple files impacted.
Change-Id: I8ede271bfdb0e53d01cfebc69ac398e849a0e1aa
If tests for py27 is executed before py34 tests, then testrepository may
create a database that python 3.4 cannot use.
Change-Id: I0c43ff92f1fadced9ebc188bc1b902a7ec65f669
Closes-bug: #1489059
This commit adds a medium severity and confidence filter on the
Bandit baseline tox target. Some of the lower threshold tests
aren't appropriate for a gate.
Change-Id: Iba75392d777bf93bece6d87b2fee4ff6b334b463
This commit adds the linters target to Bandit. The idea is that
we will add a linters target that runs both the pep8 checks and
Bandit baseline. A new commit will add the 'linters' target to
infra.
Change-Id: I7cce523cbefe23c9ce77dc87c3662c8453cd9899
If we use a develop version of bandit, setup.py does not execute via
pip, it executes standalone which does not properly install the config
file.
By listing the project itself (.) as a dependency, it properly installs
bandit as we expect it to and installs our config file appropriately.
Closes-bug: #1527415
Change-Id: I406a4843f1c0f3b3f1fc54bd6f32dd8ec68f5d31
As discussed at the security IRC meeting, there's no real need for
testing of pypy. Therefore this patch will remove it.
Change-Id: I584dbe1b5aa6928740dfb18deaf4c162f616b7fa
Remove the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.
This helps ensure that the _ from i18n is used.
Activating this check did not flag any violations.
Change-Id: I458c7749de5bd88909f23554485f2adfcb56e2d4
This adds documentation framework for Bandit. To build the new
documentation you can use the new tox target:
tox -e docs
This will spit out various formatted output into the docs/build
folder.
Change-Id: I3497e26052021900ad55ecdd2517198b22e82f0e
Partial-Bug: 1474796
This script is intended for inclusion in the Bandit repository and usage
by the Bandit and other OpenStack teams. It is not intended for inclusion
in Bandit packages / distribution.
It executes against Jenkins and Zuul configuration files in the
openstack-infra/project-config repository, parses out Bandit jobs
and tests, and prints a summary of results.
It includes definition of an openstack_coverage testenv in tox.ini with
basic PyYAML and request dependencies to allow easy venv creation and
script execution.
Co-Authored-By: Ian Cordasco <graffatcolmingov@gmail.com>
Change-Id: I2d133146223a6b185347662b47cc2bd6355a0900
This includes a number of changes to make this happen:
- We handle the fact that in Python 3.3 and later, ast.TryExcept and
ast.TryFinally were replaced by ast.Try
- We handle the fact that ast.NameConstant is now the node type for
True/False
- We handle the cases where map and range need to return lists
- We remove a property from the result store to prevent errors assigning
to the underlying attribute
- We check for exec conditionally based on the version of Python
- We use proper octal notation, e.g., 0o755
Change-Id: I71c0bb61c9ee0bf1b751a719a4eb95bf7a0b4943
This large change makes bandit into an installable packahge, needed
for tox testing. I have added the tox testing scaffolding but no
real tests, they will come in a later change. I have also disabled
all failing PEP8 test (lots) since I have changed enough stuff for
one patch. I'll start re-enabling and fixing PEP8 stuff soon.
Change-Id: I774ed9149f285e4e2bceacda0484a7e2a934a3aa