Commit Graph

309 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 8930d98a26 Custom root configuration option
Instead of syntribos taking in ``--custom_install_root` during init and
``--syntribos-custom_root`` during run, which sometimes led to the custom root
option not being set correctly, the redundant config options have been
deprecated.

Change-Id: I95f4d345fe8a8608ff6d1daaf06ff49912917a3f
2018-12-10 16:03:19 -06: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
Zuul 8818cb5aab Merge "modify keystone spelling errors" 2018-10-18 23:13:13 +00:00
sunyandi 4a0b592fb3 modify keystone spelling errors
Change-Id: I3ef263c3ea78b803739f1871175d417003252430
2018-10-18 22:17:15 +00: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 daa6575940 Fixed logging issue in payload downloading
Change-Id: Ice45ca913a60ef5798fbc1d0d4e741083f647316
2017-11-09 17:24:34 -06:00
Michael Dong cb460174c3 Fixed Broken Payload Downloading
Change-Id: I88a610bcd0855bf25c623655b4daa49276399db2
Closes-bug: #1729797
2017-11-07 15:51:56 -06: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 cb458c03db Clarified docs and error messages
Change-Id: Ic30f6ade79461770a5283b4783aaa6d547049cff
2017-09-15 19:38:41 -05:00
Michael Dong 92978b3783 Added support for inline meta variable definitions
Before, a meta variable of the form "application/|type|" would
throw an error, now you can specify |type| as a metavar.

Change-Id: I0f9ba4635cdd6e2886d7f2f5e1ce2ab5b8dc2330
2017-09-15 19:38:41 -05:00
Ngo Quoc Cuong 1f1b7be594 Remove translation of log messages
The i18n team has decided not to translate the logs because it
seems like it not very useful; operators prefer to have them in
English so that they can search for those strings on the internet.

Change-Id: I84b1a2397f424430ed332aa7d4d874379abd0357
2017-06-16 15:42:45 +07:00
rahulunair c1d3407c3f Fixing py35 unicode bug
In py35 syntribos init failed with unicode error,
this patch fixes that. This issue was in the file
type checking code. Now syntribos will try to
extract the remote `tar.gz` file downloaded and
if it fails, then the absolute path is returned.

Change-Id: I6cd5f6951d42a6230635af4c0afec9e8d88c117a
Closes-Bug: #1680022
2017-04-10 05:25:52 +00:00
Michael Dong 1493f0f3b9 Fixed errors printing in scientific notation
Change-Id: I23ac487703942630d4c4ff8f4f7b826fba3a75fc
2017-03-15 17:00:43 -05:00
Jenkins ba47ac7625 Merge "Changing default template URL" 2017-03-14 22:27:40 +00:00
Rahul Nair 5787563d80 Changing default template URL
As the templates have been moved to official repo, changing the
default URL in config to reflect the same.

Change-Id: If1050470947248f6c46a33bcaf1054dad3431b62
2017-03-14 16:31:49 -05:00
Vinay Potluri c300ca8313 Fixing nits in i18n patch
Running syntribos throws an error due to nits in the i18n
patch. This patch fixes the errors in runner.py and result.py.

Change-Id: Ic1c041f586e4f556fd1c1e30b6dc3f3dcd0284fe
2017-03-14 14:18:39 -05:00
Michael Dong 5d7771fb8e Added meta variable support to runner
The runner will now respect inheritence when passing meta variables
to the parser.

Change-Id: I84ae827fcb396a1cb701d212601a8dcd56a37d9e
2017-03-13 14:43:49 -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
Rahul Nair 38eb9f2a77 Adding i18n support to Syntribos
Adding i18n support to syntribos log messages and prompts.

Change-Id: If9914447ccbf3ac2f9c88c3460756f4b682630ec
2017-03-13 01:51:50 -05:00
Jenkins 9fe18d5e96 Merge "Adding XST test to syntribos" 2017-02-27 21:37:01 +00:00
Rahul Nair 5ed065aaed Adding XST test to syntribos
Adding cross site tracing test to syntribos. This vulnerability
can be exploited only if there are existing xss vulnerabilities
in the app.

Moving "checks" that deals specificially with header data to
"header" directory.

Change-Id: I7b4b40ca54a95628e9b6d55963b5e159e6862a45
2017-02-23 15:16:39 -06:00
Anh Tran 9c736a3560 Remove unused logging import
Change-Id: Ica3568dd9c10a1e02a063af491b2fd4f2a1a2134
2017-02-20 11:23:45 +07: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
Vinay Potluri 5664f99a4b Improving readibility of code
Changing six.iteritems(kwargs) to kwargs.items() to improve
readability of code and reduce the use of python package six

Change-Id: I7460c0274b790efcd53ee9d1c0bc538effb950dd
2017-01-25 14:25:54 -06:00
Rahul Nair 6eb64af8b5 Updated pylint rules
Fixed few `issues` as stated by pylint to pass the new linter
rules.

Change-Id: I8ffeff7125a1fda367a9cefa1a3d3cfcbadd37d0
2017-01-23 15:07:27 -06:00
Michael Dong ebfd5728cd Added documentation for template file naming requirements
Our docs and logs did not say that template files have to be named
".template" anywhere

Change-Id: Ieea6e3d7fa92b585a2f556acbc60b5eb962d6bbd
2017-01-20 16:58:55 -06:00
gecong1973 a785dad71b Delete unnecessary utf-8 coding
The file was added redundant utf-8 coding by some editor.
we can delete it .

Change-Id: Ie6ab1a9fde8e95d0757f15a72418fb39cb0f6cba
2016-12-27 10:17:29 +08:00
Xin Bai d1869bdd86 Fixing bug on syntribos init
The latest change introduced a bug to syntribos init. It crashed on
line 282 when CONF.config_file and CONF.config_dir returns list but
str expected. This patch fixes it.

Closes-Bug: 1648562

Change-Id: Ib83dd03a500613843abadc5dcbfd9a9c477f8503
2016-12-13 14:18:11 -05:00
Jenkins c36786f1f6 Merge "Respect cli args for initialization check" 2016-12-07 16:52:10 +00:00
Jenkins abc1f50c04 Merge "Bug fix for user defined tests" 2016-12-06 22:03:51 +00:00
Rahul Nair 1c7804a5c5 Changing payload URI to official one
As payloads have been uploaded to the official repo, this change
updates the remote uri for payloads.

Change-Id: I074f1568e17e3b6192c439f1fcb3de98095ba351
2016-12-06 12:20:20 -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
Duncan Hutty 15508896ba Respect cli args for initialization check
Change-Id: I8d9f2d6d4e5e3f51553b4f577d42538c05ad2266
Closes-Bug: #1647470
2016-12-05 17:10:46 -05:00
Rahul Nair fb7320a8d9 Bug fix
Recent changes in exception handling, introduced a bug, this patch
fixes it.

Change-Id: I840122ede269ada2fac2aa2b812531d36975759e
2016-11-30 17:21:11 -06:00
Jenkins fbfdaa9b44 Merge "Pylint changes update" 2016-11-28 18:51:33 +00:00
Cao Xuan Hoang 76852bd946 Remove cfg import unused
This patch removes cfg import unused in
syntribos/utils/config_fixture.py

Change-Id: I807785d50d432ac4dd5e703cb4106023d32edafe
2016-11-28 13:58:22 +07: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
Jenkins 1c973b4646 Merge "Adding pylint check to syntribos" 2016-11-22 17:35:59 +00:00
Rahul Nair 8aae08f39f Adding pylint check to syntribos
Adding pylint check to syntribos and updating few files to
make the files compliant.

Change-Id: I1970a0351fec1d8898a15e4433a5dbe161df0168
2016-11-21 18:11:06 -06:00
Jenkins 8757ff2234 Merge "Better exception messages" 2016-11-21 23:43:59 +00:00
Rahul Nair d44f0e58d6 Better exception messages
Messages displayed for some exceptions are too vague and have
stack traces, cleaning up a few messages and the way they are
handled.

Change-Id: I7b134844e8a9cfa21a119cd5b5b6c37871d0381a
2016-11-21 20:06:59 +00:00
Rahul Nair ef67b47345 Adding ReDoS test to syntribos
Adding ReDoS test to syntribos. ReDos was earlier merged with
string_validation test, as ReDoS is a pure test in itself, adding
the same.

Change-Id: I04b2c80486d897eef2764223e2ba0f4433bc9144
2016-11-17 14:45:43 -06:00
Jenkins d1912c278c Merge "Adding ability to do User defined fuzz test" 2016-11-16 00:09:23 +00:00
Jenkins 1186677bf1 Merge "Adding new test to syntribos" 2016-11-15 21:57:57 +00:00
Rahul Nair efaaaa70c5 Adding new test to syntribos
There is a possibility for the json parser to reach depth limit
and crash. This test checks for that and raises an issue if the
parser crashes.

Change-Id: I2ecb77e2e9aef2379321142d608eb714b33d970a
2016-11-15 15:12:03 -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
gecong1973 d0ef1e7dbc Add __ne__ built-in function
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you
define __eq__ for it to work properly [1].There are no implied
relationships among the comparison operators. The truth of x==y
does not imply that x!=y is false. Accordingly, when defining __eq__(),
one should also define __ne__() so that the operators will behave as expected.
[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

Change-Id: I48a2e8a6bafd183037fb5f67fd77728072890d53
2016-11-15 10:16:35 +08:00
Rahul Nair a2f1d7c222 Fixing a bug due to getlogin() in syntribos
The bug is due to the fact that sometimes when using os.getlogin(),
Python is calling the system getlogin() function and returns a strerror
"No such file or dir", thus failing to get the login name.

Change-Id: I4156325d7435c69943b2bb736bd1ec7b4d060db4
Closes-Bug: #1640850
2016-11-10 15:20:24 -06:00