Commit Graph

63 Commits

Author SHA1 Message Date
Andreas Jaeger 8c881bcbe5 Retire repository
See
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007708.html

Change-Id: If97f10290c16903d550c66163b082bd23357fca2
2020-05-08 13:51:25 +02:00
Michael Dong 6cf7bdab87 Bug fixes and error message updates
Fixes:
1) Crashes in runner and file_utils
2) Binary strings being read in as payloads

Updates:
1) Clarified error messages in parser
2) Confusing variable names in test cases vs issues

Adds:
1) A `syntribos root` CLI sub command to display the current syntribos root dir

Change-Id: I22edf7a1f3d39724522aee88d08b00d299b67248
2018-11-28 12:32:24 -06:00
Michael Dong a6db29dc7c Bug fixes related to python 3 changes
Change-Id: I048bb19cf456281521883eb1500832343d72fb97
2018-10-18 14:39:59 -05:00
Michael Dong feb3a59c95 YAML support, basicauth extension, bugfixes
1) Allows for YAML body in request templates. If a content-type
    is specified for a request template, Syntribos will validate the
    body against the header. This is to prevent templates from silently
    failing to parse and sending unintended data to the target.
 2) Added extension to support basicauth
 3) Lowered confidence ratings for various tests

Change-Id: I672b0e0aa3da1aa6dd7e9a8456da73f0a15759b7
2018-10-09 15:55:53 -05:00
Michael Dong c4586a374b Improve performance by multithreading test calls
This change:
1) rewrites the runner to spawn a thread pool for each template
   and assigns a worker for each test case
2) makes the output colorized by default
3) makes minor changes to the output

Change-Id: I49906f5daaa339ca9429913680203c762a0ad9fe
2017-09-18 13:23:00 -05:00
Michael Dong 6ded748d09 Added meta var support to datagen
The datagen will now respect the limits defined in the meta
variable file when fuzzing a template

Change-Id: If1e7b2d86b8b2ac45d64d37562e0b7d776c54742
2017-03-13 12:03:34 -05:00
Michael Dong c5a4dd083d Added support for meta variable JSON files
Syntribos now allows the user to specify variables in their request
templates by reading from a meta.json file. This is part 1 of 3 of
the full effort, dealing primarily with the template parser itself.

Change-Id: Id41d331f595cd3bc32f085ef49cb5d1b16779a5c
2017-01-27 11:03:39 -06:00
Rahul Nair 7ec6d7450f Bug fix for user defined tests
A bug was introduced in the user defined test, this change attempts
to fix it.

Change-Id: I29d4af97e89bab3245f3a3b1c75519023f0ca43e
2016-12-06 11:49:53 -06:00
Rahul Nair 94d0205b8e Pylint changes update
Updated the enabled tests and edited set of files to pass present
enabled tests.

Change-Id: I369166bacbd816b4d85732d476158468ed271d49
2016-11-22 16:10:50 -06:00
Rahul Nair f5d039f765 Adding ability to do User defined fuzz test
During the first set of tests we did, it became clear that we
would need a way to test specific user provided string and check
them against user defined failure keys.

This test adds that functionality to the suite.

Change-Id: I53833c2ab11813d746d9fc97355adaf51eb6096e
2016-11-15 15:05:43 -06:00
michael.dong@rackspace.com 46d5ba400b Introduced payload and template downloading
Syntribos now downloads payloads as part of the initialization process, and
also can download payloads and templates as part of the 'syntribos download'
command.

Change-Id: I17501535e5fd341c2705e07e3797643dc2d4a7df
2016-10-28 14:42:12 -05:00
Rahul Nair 8faed09ebe Fixing unicode error
When syntribos attempts to download templates, it fails with
unicode error. This patch fixes it.

Closes-Bug: #1636609

Change-Id: Id62e9ed70d1b4501fe531587947c1f6d88bf034a
2016-10-26 17:33:27 -05:00
Vinay Potluri 34091d3599 Changing payloads_dir to payloads
Changing the payloads_dir variable to payloads

Change-Id: I55ae283d1b4b92d397c1cd85acd7c88f9bbe87fd
2016-10-26 02:04:28 +00:00
Rahul Nair b7b925cf4d Loading payload from remote URI
POC on loading payloads using remote URI. This is part of a larger
effort in packaging syntribos to ensure that the project would
work without much configuration post install from pypi.

Change-Id: Id61e840d4f49d5b6deb72bce2e8bcc0e1096fa52
2016-10-25 10:28:25 -05:00
Jenkins f562a9ec3d Merge "Revamped results schema" 2016-08-29 20:51:52 +00:00
michael.dong@rackspace.com adca69a272 Revamped results schema
Results are now formatted in the schema as defined here:
https://gist.github.com/cneill/a511451284a0c5f33295477150bd94d4

Furthermore, the json formatter is no longer responsible for the aggregation
of issues. Instead, this logic has been moved to the IssueTestResult class

Change-Id: Id39e122b2b4c1c9cafab09fdbc5d172dec012d22
2016-08-29 15:40:02 -05:00
Aastha Dixit 57e6a82993 Buffer Overflow data file dependency is removed
The data file buffer-overflow.txt is never used, instead the string
generated in buffer_overflow.py is used for testing buffer overflow,
so the text file dependency is removed.

Change-Id: I4928926aa42b568502bd0b99b15b06d0667968ca
2016-08-26 17:56:13 -05:00
Rahul Nair 0009bf49ce Adding unique_id to tests
Adding a simple counter based id to tests to track them in debug
log and results log. Also, this patch improves the result output
like adding a progress bar and uniform test names..

Change-Id: Ib83181b25a0c18c7993f491cde98d73555b01404
2016-08-04 20:22:17 +00:00
Charles Neill 95ed57ca94 Removes FuzzRequest from Syntribos
- This removes FuzzRequest as a type of RequestObject. All requests are
  now RequestObjects, and are parsed by the
  syntribos.clients.http.parser
- Fuzzing a request is now done via
  syntribos.tests.fuzz.datagen.fuzz_request()
- Moved _remove_attr_names and _remove_braces to the RequestObject
- Added unittests for fuzz datagen, http client models

Change-Id: Ib589c34ad80da58daab875d7383210d22d82d764
2016-08-03 01:15:38 +00:00
Charles Neill 879a76a488 Renaming BaseTestCase/BaseFuzzTestCase methods
This updates the BTC/BFTC class methods based on the changes we agreed
on in our 7/13 meeting.

Details here: https://etherpad.openstack.org/p/syntribos-planning

Change-Id: I05e426ee1832385ec42d64ba930caea9ddd5374f
2016-07-29 14:55:27 -05:00
Jenkins a42cf2895b Merge "Added string presence check" 2016-07-29 01:33:50 +00:00
Vinay Potluri cf9ab6ebe7 Added string presence check
Removed data driven pass case and refactored data driven failure case
with a string presence check

Change-Id: I1abce36296676e2c7d4a3eacaf16c619b80199f1
2016-07-28 16:52:57 -05:00
michael.dong@rackspace.com 58d3db7bf4 Added signals to results output
Currently, no signals are printed with the output, so now, the slugs of signals
associated with each issue are now printed in the results output. We may
revisit this to add strengths and tags should they be needed in the future.

Change-Id: Ib58127a9d6bb296b9731668e957c15e5c2ef71f4
2016-07-28 12:16:49 -05:00
Rahul Nair dcdcda3dde Modifying checks to use test objects
Check modified to use test objects.

Change-Id: I110a7609fc172f03998a201ca6975af26f1003c3
2016-07-18 15:48:56 -05:00
Charles Neill a8a9ac6e37 Converting to oslo.config for configuration
- Merges arguments.py and and existing config.py files into one file
- Removes dependencies on cafe.* config file / CLI parsing
- Adds "register_opts" to BTC to allow Tests to specify config options
- Moves us completely from cclogging to Python logging

Change-Id: I0d4a84563d54307c94c0064be429919f9d91d67b
2016-07-11 11:52:51 -05:00
Charles Neill 70c62a0c0b Refactoring BaseTestCase/BaseFuzzTestCase
- Removed unnecessary code from BTC
- Moved some components from BFTC to BTC
- Start using signals for all tests
- Renamed several variables in BTC for clarity
- Cleaned up BaseAuthTestCase somewhat

Change-Id: I3efc44b33aa4416e1f9853910485a8c5703a9057
2016-07-05 15:42:01 -05:00
michael.dong@rackspace.com 445e12362e Simplified imports and added constants
Issues, Constants, and Results are now imported in the __init__.py of
the module

Change-Id: I805c9df4f8b838d63e2a7d04f5998718a7bf4ecb
2016-06-21 13:34:39 -05:00
michael.dong@rackspace.com d1ca60c5f2 Moved SSL test out of BaseFuzzTestCase
Change-Id: I8cd5d7c651a324faaa9ceb9b4a79740b4b8b99bc
2016-06-20 11:26:03 -05:00
Jenkins c1499d1802 Merge "Added SSL test case" 2016-05-25 00:44:28 +00:00
Vinay Potluri 0d323355d3 Added SSL test case
Added SSL test case to check the returned response for http urls
over https urls

Implements blueprint test-transport-layer-security

Change-Id: I87eb6b075e5b528f0634500bc0ed2b52ff19e241
2016-05-24 14:54:12 -05:00
michael.dong@rackspace.com cc89c7da39 Validate_length now checks status code
Change-Id: I99d43ef1a07191abe9a9adb8d8606c2518433da3
2016-05-24 11:22:03 -05:00
Jenkins 04ec5dfe05 Merge "Moved extend_class() function" 2016-05-18 23:00:09 +00:00
michael.dong@rackspace.com 3477b2f7be Moved extend_class() function
Extended the extend_class() method from BaseTestCase in BaseFuzzTestCase, as
only BaseFuzzTestCase should have fuzz_string and param_path as parameters to
the method.

Change-Id: If39629caed9d9659bb4c7c39eb8199b25610b5b1
2016-05-18 17:32:13 -05:00
michael.dong@rackspace.com 8a25d656de Fixed payload truncating
Change-Id: I9cc0496ad1a6eb186f09230dbb51cdd75272eaf0
2016-05-18 12:01:26 -05:00
Rahul U Nair 21a8c43dab Fixed a few nitpicks in the code base
Replaced `None` with `{}` in http/models.py
Removed urllib disable warnings.
Changed `sql_strings` to `bof_strings`
Removed `as` in import statement in runner.py
Removed non needed new line in arguments.py

Change-Id: I6f5285b446bd44054360ae7bfc6c1893c1341f03
2016-05-10 00:38:04 +00:00
michael.dong@rackspace.com 58688be8d8 Propagated content-type header to Issues for reporting
Change-Id: Id842e091519acae80e28709a6d6cdde36b347c0a
2016-05-02 17:44:23 -05:00
Charles Neill 679cfd5d2f Docstrings for more Syntribos components
Adding a few more docstrings, populating code-docs page, modifying
Sphinx documentation generation.

Implements: blueprint docstring-add-to-framework
Change-Id: I9506c9fdeab19d9b4bf52ee3a51c27e38476e82e
2016-05-02 17:00:24 -05:00
Jenkins b0e2da37ce Merge "Json formatter now outputs data according to findings schema" 2016-04-15 18:06:24 +00:00
michael.dong@rackspace.com e3f932001c Json formatter now outputs data according to findings schema
Results are now output according to this schema:
https://gist.github.com/MCDong/9969351647c06f7ab67ab7d954e6cd66

Change-Id: I4042e425f9577da21488d9dacfa4597456644cac
Implements: blueprint improve-reporting
2016-04-15 12:37:16 -05:00
Charles Neill 921157a4d6 Change license from block quotes to '#'s (Sphinx)
We are currently using block quotes for license comments, which means
that Sphinx pulls this into every module, which is bad. Hash-prefixed
comments for licenses seem to be the standard for OpenStack as well.

Change-Id: Iabc60228c1201a960f672e1b0c7ab3c5312c9d8e
Implements: blueprint docstring-add-to-framework
2016-04-14 18:17:40 -05:00
michael.dong@rackspace.com 61074f30cf Long fuzz strings now truncated in output
Change-Id: Ib6f0951ef8f9eecb07c01540146f28641bdf4d4d
2016-04-12 11:35:18 -05:00
michael.dong@rackspace.com 533fa8f011 Issues now conform to Syntribos test schema
Based on https://github.com/cneill/syntribos-schema/blob/master/test_schema.md,
Issues now encapsulate the information as discussed in the test schema.

Change-Id: Ifc29062c1e4f3cea306b6cc3aae64efe8e1c532a
2016-04-07 18:33:16 -05:00
Charles Neill 9eca39e127 Updating doc strings for core pieces of Syntribos
This PR adds docstrings to a number of important components of
Syntribos, and adds this documentation to our Sphinx doc structure. It
also removes copyrights from __init__.py files with no other content,
in line with OpenStack style guidelines.

Set 2: Fixed PEP8 failure.

Change-Id: Ic57b31f451ec3ecf7f5b308da4544f808c9c9a5d
Implements: blueprint docstring-add-to-framework
2016-04-05 16:20:56 -05:00
michael.dong@rackspace.com 3fff915563 Test logic is no longer written in terms of assertions
Changes to the framework are only found in runner.py and base.py.

Tests are now no longer written as lists of assertions, which before meant that
it was impossible to access any variables used in the test itself after the
test was over. Instead, the register_issue method now adds the issue to
cls.failures, and will throw an AssertionError if there are any failures
reported to the test runner. This will allow us to do things like put the
failure string into the Issue description.

Change-Id: Ic3ca2ec48a6e1d99d56e605a2e0d0dc89158bc72
Implements: bp/framework-issue-creation
2016-03-29 17:58:45 -05:00
michael.dong@rackspace.com c511322c5f Modified base test cases
Test cases that inherit from base fuzz will now include the issues tested
by the BaseFuzzTestCase

Change-Id: Ib16879ade23ca7bbaaa39fd2d4a9e64a6d40283a
2016-03-14 15:24:58 -05:00
Jenkins 92f8dd4f5f Merge "Results aggregation" 2016-03-09 15:42:09 +00:00
Michael Dong ec54af8d32 Results aggregation
Issues are now only reported once for each URL and HTTP method

Change-Id: Icd711d3e0d735d030c785d0220bdaaf4a42e07e4
2016-03-08 13:26:30 -06:00
michael.dong@rackspace.com a7b22cf4e4 Wrote docstrings
Change-Id: I804b3fbb50cb0ec835b50984881d14976a41784b
2016-02-09 12:54:42 -06:00
Michael Dong 4d02e013b2 Moved 2 functions from BaseFuzzTestCase to BaseTestCase
Registering an issue and testing that issue should be universal to
all test cases, not just fuzz test cases.

Change-Id: Idd09819475f68d99a8d0d491daac4e03e286a321
2016-01-29 10:32:05 -06:00
michael.dong@rackspace.com 65e5e50e3d Hardcoded confidence levels
Change-Id: I6a2876e27663062ec8876d0857e9770db573cd40
Implements: blueprint reporting-confidence
2016-01-28 13:58:54 -06:00