]> git.ipfire.org Git - thirdparty/suricata-update.git/log
thirdparty/suricata-update.git
7 years agoInstall requirements if using pip 66/head
Shivani Bhardwaj [Fri, 23 Nov 2018 14:55:29 +0000 (20:25 +0530)] 
Install requirements if using pip

Current setup was using distutils which does not allow to define the
requirements of a package. Check if the installation of
`suricata-update` is being done with `pip` and if it is, install the
requirements while installing the package.
This way distutils will not throw a warning of the `install_requires`
option being unrecognized, however, it would still not install the
requirements.
Now, with the installation of `suricata-update` package, all the
requirements are installed as well if it is installed with `pip`.

Closes redmine ticket #2667

7 years agoAdd the required data for sample confs to setup 63/head
Shivani Bhardwaj [Thu, 22 Nov 2018 16:12:40 +0000 (21:42 +0530)] 
Add the required data for sample confs to setup

setup.py missed the required configuration files for running the
`dump-sample-configs` option. Add all the files under
suricata/update/configs.

Closes redmine ticket #2683

7 years agoversion: 1.1.0dev0
Jason Ish [Tue, 20 Nov 2018 16:19:57 +0000 (10:19 -0600)] 
version: 1.1.0dev0

7 years agochangelog: issue 2665
Jason Ish [Tue, 20 Nov 2018 16:18:11 +0000 (10:18 -0600)] 
changelog: issue 2665

7 years agochangelog: issue 2641 addressed
Jason Ish [Tue, 20 Nov 2018 16:02:15 +0000 (10:02 -0600)] 
changelog: issue 2641 addressed

7 years agoAdd --free argument to list-sources command
Shivani Bhardwaj [Wed, 31 Oct 2018 15:38:02 +0000 (21:08 +0530)] 
Add --free argument to list-sources command

Add the functionality of being able to list only the free sources with
the `list-sources` command. This patch differentiates a free source from
a non-free source based on the availability of "subscription-url" for a
particular source.

This argument is also available in the help section of `list-sources`
command.

```
$./suricata-update list-sources -h
usage: suricata-update list-sources [-h] [-v] [-q] [-D <directory>]
                                    [-c <filename>]
                                    [--suricata-conf <filename>]
                                    [--suricata <path>]
                                    [--suricata-version <version>]
                                    [--user-agent <user-agent>]
                                    [--no-check-certificate] [-V] [--free]

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Be more verbose
  -q, --quiet           Be quiet, warning and error messages only
  -D <directory>, --data-dir <directory>
                        Data directory (default: /var/lib/suricata)
  -c <filename>, --config <filename>
                        configuration file (default:
                        /etc/suricata/update.yaml)
  --suricata-conf <filename>
                        configuration file (default:
                        /etc/suricata/suricata.yaml)
  --suricata <path>     Path to Suricata program
  --suricata-version <version>
                        Override Suricata version
  --user-agent <user-agent>
                        Set custom user-agent string
  --no-check-certificate
                        Disable server SSL/TLS certificate verification
  -V, --version         Display version
  --free                List all freely available sources
```

Closes Redmine ticket #2641.

7 years agoclassification.conf: update test to match new strings
Jason Ish [Tue, 23 Oct 2018 20:13:28 +0000 (14:13 -0600)] 
classification.conf: update test to match new strings

7 years agoclassification.conf: Changed to Suricata 4.1 style
Travis Green [Tue, 23 Oct 2018 19:31:17 +0000 (13:31 -0600)] 
classification.conf: Changed to Suricata 4.1 style

should remain backwards compatible

7 years agoRemove User-Agent header if set to empty 59/head
Shivani Bhardwaj [Tue, 6 Nov 2018 16:06:24 +0000 (21:36 +0530)] 
Remove User-Agent header if set to empty

`suricata-update` sends a User Agent as a part of the request header to
get some basic information about the user system like the suricata-update
version, python version, etc. However, some users do not like this
behavior and are facililated with a `--user-agent` option whereby they
can modify the `User-Agent` header to a custom string. Although, in some
cases, it has been observed that the `User-Agent` header can be set to
nothing. In some other cases, users wish to set it to an empty string.

Example:

```
$ ./bin/suricata-update update-sources --user-agent "  "
```

generates request headers like,

```
Accept-Encoding: identity
Host: XXX
User-Agent:
Connection: close
```

which makes `User-Agent` header quite redundant.

Remove the header if it is set to a string that evaluates to nothing.

Closes Redmine ticket #2665.

7 years agoCheck default conf before command line options
Shivani Bhardwaj [Tue, 6 Nov 2018 15:59:10 +0000 (21:29 +0530)] 
Check default conf before command line options

The default configuration file must be checked for the availability of
`user-agent` option even if it is None.

This behavior has been implemented by Jason Ish.

7 years agoquickstart: update for 1.0
Jason Ish [Tue, 6 Nov 2018 15:36:25 +0000 (09:36 -0600)] 
quickstart: update for 1.0

Also add note that if using Suricata 4.1 the command may already
be installed.

7 years agoreadme: update for 1.0.0 1.0.0
Jason Ish [Mon, 5 Nov 2018 15:38:06 +0000 (09:38 -0600)] 
readme: update for 1.0.0

7 years ago1.0.0 - update changelog, set version
Jason Ish [Mon, 5 Nov 2018 15:10:53 +0000 (09:10 -0600)] 
1.0.0 - update changelog, set version

7 years agologging: better log message when a new file is identified 56/head
Jason Ish [Tue, 30 Oct 2018 19:54:36 +0000 (13:54 -0600)] 
logging: better log message when a new file is identified

instead of saying "recording <file> with hash ''" where the
hash is empty, log that a new file is being recorded

No functional change outside of the log message.

7 years agoShow error on failure to create output directory.
Jason Ish [Tue, 30 Oct 2018 19:35:16 +0000 (13:35 -0600)] 
Show error on failure to create output directory.

Previously:
  Output directory does not exist and could not be created:
      /var/lib/suricata/rules
Now:
  Failed to create directory /var/lib/suricata/rules:
      [Errno 13] Permission denied: '/var/lib/suricata

7 years ago--test-command: fix call to get output directory
Jason Ish [Tue, 30 Oct 2018 17:33:44 +0000 (11:33 -0600)] 
--test-command: fix call to get output directory

A custom --test-command was failing due to the wrong usage
of getting the output directory, resulting in the call
to open failing.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2652

7 years ago1.0.0rc2 47/head 1.0.0rc2
Jason Ish [Fri, 12 Oct 2018 16:54:38 +0000 (10:54 -0600)] 
1.0.0rc2

7 years agoindex: update bundled rule source index
Jason Ish [Fri, 12 Oct 2018 16:44:31 +0000 (10:44 -0600)] 
index: update bundled rule source index

- Includes Etnetera.

7 years agoUse assertEqual instead of deprecated assertEquals
Shivani Bhardwaj [Wed, 3 Oct 2018 16:47:00 +0000 (22:17 +0530)] 
Use assertEqual instead of deprecated assertEquals

Replace the use of assertEquals in all places with assertEqual as the
former was deprecated in https://bugs.python.org/issue9424
assertEquals goes well with Python 2.7 alongwith Python 3.x so this does
not break any existing test cases.

7 years agoAdd Python 3.7 to tox configurations
Shivani Bhardwaj [Wed, 3 Oct 2018 17:32:58 +0000 (23:02 +0530)] 
Add Python 3.7 to tox configurations

Current tox configuration was missing Python 3.7 because of which tests were
never run for a Python 3.7 environment. Fix that by adding py37 to the configurations.

7 years agotravis: test on python 3.7 43/head
Jason Ish [Wed, 3 Oct 2018 16:35:46 +0000 (10:35 -0600)] 
travis: test on python 3.7

7 years agoQuote reload command 42/head
Anh Le [Fri, 27 Jul 2018 06:21:32 +0000 (23:21 -0700)] 
Quote reload command

suricata-update throws error if the command is not quoted.
```
suricata-update: error: unrecognized arguments: kill -USR2
```

7 years agoissue 2551: python3 issue loading disable.conf 41/head
Jason Ish [Mon, 23 Jul 2018 22:02:19 +0000 (16:02 -0600)] 
issue 2551: python3 issue loading disable.conf

... and likely other related files.

The failing disable.conf has been added to the integration
tests.

Issue:
https://redmine.openinfosecfoundation.org/issues/2551

7 years agoadd-source: fix prompt for required fields
Jason Ish [Mon, 23 Jul 2018 21:31:52 +0000 (15:31 -0600)] 
add-source: fix prompt for required fields

The command had the code to prompt the user for the required
fields but the argument parser was forcing them to be set
on the command line. Make the name and url optional for
the argument parser, and prompt if not provided.

Also, handle user input on Python 2 and 3.

Fixes issue:
https://redmine.openinfosecfoundation.org/issues/2550

7 years agoissue 2549: python3 fix enable-source
Jason Ish [Mon, 23 Jul 2018 21:26:56 +0000 (15:26 -0600)] 
issue 2549: python3 fix enable-source

In Python 3, raw_input was renamed to input. This is now Python 2
and Python 3 compatible.

7 years agoversion: 1.0.0rc1 40/head 1.0.0rc1
Jason Ish [Tue, 17 Jul 2018 17:32:21 +0000 (11:32 -0600)] 
version: 1.0.0rc1

7 years agochangelog: update
Jason Ish [Thu, 12 Jul 2018 13:42:43 +0000 (07:42 -0600)] 
changelog: update

7 years agoconfig: save the filename that was used for the config 39/head
Jason Ish [Mon, 9 Jul 2018 16:57:26 +0000 (10:57 -0600)] 
config: save the filename that was used for the config

So it can be presented to the user in log messages, specifically
when listing enabled sources that are in the main configuration
file.

Fixes issue:
https://redmine.openinfosecfoundation.org/issues/2526

7 years agosid matchers: allow command separated sids 38/head
Jason Ish [Thu, 21 Jun 2018 16:18:18 +0000 (10:18 -0600)] 
sid matchers: allow command separated sids

Inspired by patch from Russel Fulton.

7 years agotests: move matcher tests to test_matchers
Jason Ish [Thu, 21 Jun 2018 16:04:30 +0000 (10:04 -0600)] 
tests: move matcher tests to test_matchers

7 years agoallow trailing commands in .conf files
Jason Ish [Thu, 21 Jun 2018 15:28:03 +0000 (09:28 -0600)] 
allow trailing commands in .conf files

Based on patch from Russel Fulton.

7 years agoarg handling: fix broken argument handling
Jason Ish [Wed, 20 Jun 2018 21:01:53 +0000 (15:01 -0600)] 
arg handling: fix broken argument handling

Broke in 74bf64e706162de9bb1731e801609e0a667a27d8.

7 years agoFixed wording in update documentation
Mateusz Mrozewski [Sun, 15 Apr 2018 08:37:29 +0000 (12:37 +0400)] 
Fixed wording in update documentation

7 years agodisplay help, or version before parsing config file 36/head
Jason Ish [Wed, 25 Apr 2018 21:07:59 +0000 (15:07 -0600)] 
display help, or version before parsing config file

Handle the display of version info and help before parsing any
configuration data.

7 years agoattempt to load defaults from a defaults module
Jason Ish [Wed, 25 Apr 2018 20:48:16 +0000 (14:48 -0600)] 
attempt to load defaults from a defaults module

The defaults module is installed by suricata into the
and contains compile time values such as sysconfdir,
and the directory where distribution provided rules
are found.

7 years agodon't try to iterate local if None
Jason Ish [Thu, 29 Mar 2018 13:38:12 +0000 (07:38 -0600)] 
don't try to iterate local if None

7 years agofail safe if ssl.create_default_context doesn't exist 34/head
Jason Ish [Sun, 25 Mar 2018 14:34:30 +0000 (08:34 -0600)] 
fail safe if ssl.create_default_context doesn't exist

fall back to the default SSL handler when create_default_context
doesn't exist as on Python versions prior to 2.7.9 where it hasn't
been backported (Ubuntu Trusty).

The downside is no certificate verification is done.

7 years agodon't see if suricata.yaml if value is None
Jason Ish [Sun, 25 Mar 2018 14:27:26 +0000 (08:27 -0600)] 
don't see if suricata.yaml if value is None

7 years agoadd smb-events.rules as a known dist provided rule file 33/head
Jason Ish [Thu, 22 Mar 2018 21:40:57 +0000 (15:40 -0600)] 
add smb-events.rules as a known dist provided rule file

7 years agobundle the index; for when it can't be downloaded
Jason Ish [Thu, 22 Mar 2018 21:35:21 +0000 (15:35 -0600)] 
bundle the index; for when it can't be downloaded

Bundle a copy of the index and fall back to it when the
index can't be downloaded.

7 years agopython3 fix: don't use itervalues
Jason Ish [Wed, 21 Mar 2018 22:41:58 +0000 (16:41 -0600)] 
python3 fix: don't use itervalues

7 years agoengine: check_output returns encoded byts with python3 32/head
Andreas Herz [Wed, 21 Mar 2018 21:44:22 +0000 (22:44 +0100)] 
engine: check_output returns encoded byts with python3

7 years agoreadme: fix minor grammar issue
Andi [Fri, 16 Mar 2018 23:58:16 +0000 (00:58 +0100)] 
readme: fix minor grammar issue

7 years agonotes: output notes at end of run 31/head
Jason Ish [Tue, 27 Feb 2018 17:11:13 +0000 (11:11 -0600)] 
notes: output notes at end of run

Currently notes are printed if a rule was disabled due to
unknown address or port group variables.

7 years agofix --quiet: log only warning and above
Jason Ish [Tue, 27 Feb 2018 16:22:56 +0000 (10:22 -0600)] 
fix --quiet: log only warning and above

7 years agovalidate rule vars, disabling rules on error
Jason Ish [Mon, 26 Feb 2018 17:33:27 +0000 (11:33 -0600)] 
validate rule vars, disabling rules on error

If the Suricata config is available, suricata-update will check
that all rule vars are defined. If a rule uses a var that is
not defined a warning message will be logged, and the rule
will be disabled.

7 years agorules: store the addrs and ports in the rule structure
Jason Ish [Mon, 19 Feb 2018 13:58:57 +0000 (07:58 -0600)] 
rules: store the addrs and ports in the rule structure

Before they were being parsed but then thrown away.

7 years agohandle rules in spaces in addr and port lists
Jason Ish [Mon, 19 Feb 2018 13:47:28 +0000 (07:47 -0600)] 
handle rules in spaces in addr and port lists

Based on an issue reported to py-idstools.

8 years agouse --sysconfdir for default dist rules 30/head
Jason Ish [Fri, 2 Feb 2018 20:55:48 +0000 (14:55 -0600)] 
use --sysconfdir for default dist rules

8 years agodetermine defaults from suricata binary
Jason Ish [Fri, 2 Feb 2018 20:16:49 +0000 (14:16 -0600)] 
determine defaults from suricata binary

Look at --build-info and base the default configuration and
data directories based on --sysconfdir and --localstatedir.

For example, if one were to have installed suricata-update and
suricata with --prefix /opt/suricata, suricata-update will
now use these defaults:

- /opt/suricata/etc/suricata/suricata.yaml
- /opt/suricata/var/lib/suricata

8 years agocheck suricata-update directory for suricata binary
Jason Ish [Thu, 1 Feb 2018 15:57:16 +0000 (09:57 -0600)] 
check suricata-update directory for suricata binary

And use those one before looking in the path. Handles the case
when when bundled and --prefix is used to install into an
alternate location.

8 years agouse distutils: required for bundling in Suricata
Jason Ish [Thu, 1 Feb 2018 13:12:55 +0000 (07:12 -0600)] 
use distutils: required for bundling in Suricata

setuptools is too picky about installation location breaking
when --prefix is used

8 years agobin/suricata-update: handle non-standard install prefixes.
Jason Ish [Wed, 31 Jan 2018 22:31:37 +0000 (16:31 -0600)] 
bin/suricata-update: handle non-standard install prefixes.

Look to see if the modules are in a known location relative to
the location of suricata-update and to the sys.path if found.

Allows suricata-update to be installed with non-standard
--prefixes.

8 years agoreadme: fixup paths 27/head
Jason Ish [Mon, 22 Jan 2018 18:51:07 +0000 (12:51 -0600)] 
readme: fixup paths

8 years agoVersion 1.0.0b1 26/head 1.0.0b1
Jason Ish [Fri, 19 Jan 2018 20:42:10 +0000 (14:42 -0600)] 
Version 1.0.0b1

8 years agochangelog: typo
Jason Ish [Wed, 17 Jan 2018 12:54:01 +0000 (06:54 -0600)] 
changelog: typo

8 years agolist-sources: print subscribe URL 25/head
Jason Ish [Tue, 16 Jan 2018 22:46:13 +0000 (16:46 -0600)] 
list-sources: print subscribe URL

The subscribe URL may be a sentence with a URL in it which may
contain useful information.

8 years agoon download failure, return cached version (if exists) 24/head
Jason Ish [Thu, 14 Dec 2017 21:42:23 +0000 (15:42 -0600)] 
on download failure, return cached version (if exists)

Previously if a download failed, an error would be logged and
the rules that were downloaded were processed. This could lead
to an output that was no expected (missing rules).

Now if the download fails, check if we have the previous download.
If we do, log a warning and return the cached files.

If we don't have the previous download, log an error and process
what rules we do have.

8 years ago--no-check-certificate options
Jason Ish [Thu, 14 Dec 2017 21:14:59 +0000 (15:14 -0600)] 
--no-check-certificate options

Allows the disabling of server TLS certificate checks.

8 years agoconfig: more debug on initialization
Jason Ish [Thu, 14 Dec 2017 21:12:30 +0000 (15:12 -0600)] 
config: more debug on initialization

8 years agoupdate-sources: catch network errors and error out
Jason Ish [Thu, 14 Dec 2017 20:35:45 +0000 (14:35 -0600)] 
update-sources: catch network errors and error out

Issue:
https://redmine.openinfosecfoundation.org/issues/2348

8 years ago(Remote)Code-Execution while loading yaml-file 23/head
Wolfgang Hotwagner [Wed, 13 Dec 2017 20:53:34 +0000 (20:53 +0000)] 
(Remote)Code-Execution while loading yaml-file

The list of possible sources for suricata-update is downloaded from "https://www.openinfosecfoundation.org/rules/index.yaml" per default. Suricata-Update uses the insecure yaml.load()-function. Code will be executed if the yaml-file contains lines like:

hello: !!python/object/apply:os.system ['ls -l > /tmp/output']

The vulnerable function can be triggered by "suricata-update list-sources". The locally stored index.yaml will be loaded in this function and the malicious code gets executed.

This commit fixes Bug #2359

8 years agochangelog: update 22/head
Jason Ish [Tue, 12 Dec 2017 20:49:56 +0000 (14:49 -0600)] 
changelog: update

8 years agolook in config file for "suricata" option
Jason Ish [Tue, 12 Dec 2017 20:45:27 +0000 (14:45 -0600)] 
look in config file for "suricata" option

Previously the suricata binary could only be changed from
the command line. Now it can be set in the config file.

8 years agowhen testing suricata, use provided suricata-conf
Jason Ish [Tue, 12 Dec 2017 20:38:11 +0000 (14:38 -0600)] 
when testing suricata, use provided suricata-conf

Previously no suricata.yaml was specified for the test,
so the default was picked up.

8 years agoconfig: configurable suricata-conf-parameter
Wolfgang Hotwagner [Sun, 10 Dec 2017 15:03:16 +0000 (15:03 +0000)] 
config: configurable suricata-conf-parameter

This commit adds the command-line-parameter "suricata-conf" and replaces the hard-coded "/etc/suricata/suricata.yaml".

Ticket: Feature #2350

implemented support for multiple default suricata.yaml-files

8 years agodocker live test for Ubuntu 16.04. 20/head
Jason Ish [Fri, 8 Dec 2017 17:30:24 +0000 (11:30 -0600)] 
docker live test for Ubuntu 16.04.

8 years agoMakefile: docker-test target to run docker tests.
Jason Ish [Fri, 8 Dec 2017 22:46:34 +0000 (16:46 -0600)] 
Makefile: docker-test target to run docker tests.

8 years agouser agent: moving suricata version check up
Jason Ish [Fri, 8 Dec 2017 22:37:51 +0000 (16:37 -0600)] 
user agent: moving suricata version check up

before sub-commands, so the Suricata version can be provided
in "update-sources".

Also make --suricata and --suricata-path global options, so
sub-commands can depend on them.

8 years agointegration test: fix command line option (typo)
Jason Ish [Fri, 8 Dec 2017 22:37:26 +0000 (16:37 -0600)] 
integration test: fix command line option (typo)

8 years agofix verbose logging
Jason Ish [Fri, 8 Dec 2017 22:15:04 +0000 (16:15 -0600)] 
fix verbose logging

Commit c0789ccf2b64ddc93d20ea2afb0585b4cece50e1 broke
--verbose by never setting the log level to debug.

8 years agodoc: add --user-agent to common options
Jason Ish [Fri, 8 Dec 2017 22:17:13 +0000 (16:17 -0600)] 
doc: add --user-agent to common options

8 years ago--user-agent: make a global option
Jason Ish [Fri, 8 Dec 2017 22:13:11 +0000 (16:13 -0600)] 
--user-agent: make a global option

This allows it to apply to update-sources as well.

8 years agoconfig: configure a custom user-agent-string
Wolfgang Hotwagner [Fri, 8 Dec 2017 16:39:52 +0000 (16:39 +0000)] 
config: configure a custom user-agent-string

Includes an command-line/config-file-option for a custom user-agent string.

8 years agosetup: don't try to write revision of .git doesn't exist 18/head
Jason Ish [Fri, 8 Dec 2017 13:08:48 +0000 (07:08 -0600)] 
setup: don't try to write revision of .git doesn't exist

8 years agotypos: udpate -> update
Jason Ish [Fri, 8 Dec 2017 13:15:34 +0000 (07:15 -0600)] 
typos: udpate -> update

8 years agochangelog: update 17/head
Jason Ish [Fri, 8 Dec 2017 12:38:14 +0000 (06:38 -0600)] 
changelog: update

8 years agodoc: include common options with all commands
Jason Ish [Fri, 8 Dec 2017 12:33:27 +0000 (06:33 -0600)] 
doc: include common options with all commands

8 years agointegration test - executes suricata-update
Jason Ish [Thu, 7 Dec 2017 22:26:01 +0000 (16:26 -0600)] 
integration test - executes suricata-update

And checks exit codes and outputs. Can be run
as a script, or as a tox setup where it will
be run under multiple Python versions.

remove integration test from unit tests.

8 years agoallow default et/open url to be set from env
Jason Ish [Thu, 7 Dec 2017 21:58:56 +0000 (15:58 -0600)] 
allow default et/open url to be set from env

Allows the default et/open URL to be set with the
environment variable ETOPEN_URL. Mainly useful with tests
to avoid hitting the network.

8 years agolist-sources: update-sources if no index found
Jason Ish [Thu, 7 Dec 2017 20:49:43 +0000 (14:49 -0600)] 
list-sources: update-sources if no index found

Issue:
https://redmine.openinfosecfoundation.org/issues/2336

8 years agorework parser to support global options before subcommand
Jason Ish [Thu, 7 Dec 2017 20:46:33 +0000 (14:46 -0600)] 
rework parser to support global options before subcommand

Allows to do something like:
suricata-update --verbose update-sources
OR
suricata-update update-sources --verbose
having the same result.

8 years agotests: remove specific python2 and python3 tests
Jason Ish [Thu, 7 Dec 2017 13:40:21 +0000 (07:40 -0600)] 
tests: remove specific python2 and python3 tests

With tox, the tests are run under multiple versions of Python.
Just use the interpreter running the tests to hit all versions
instead of relying whats installed on the host system.

8 years ago-D, --data-dir to change the data directory
Jason Ish [Thu, 7 Dec 2017 13:18:06 +0000 (07:18 -0600)] 
-D, --data-dir to change the data directory

By default /var/lib/suricata is used. But for various reasons
including permissions and testing it can be useful to change
this.

The data directory serves as the prefix for suricata-update
work directories, including rules/ and update/sources, and
update/cache.

Addresses issue:
https://redmine.openinfosecfoundation.org/issues/2334

8 years agotravis: switch to pytest for tests
Jason Ish [Wed, 6 Dec 2017 20:11:48 +0000 (14:11 -0600)] 
travis: switch to pytest for tests

To be consistent with tox.

8 years agotesting: use tox for unit tests
Jason Ish [Wed, 6 Dec 2017 20:36:23 +0000 (14:36 -0600)] 
testing: use tox for unit tests

Tox can test against multiple versions of Python using
virtualenvs.

8 years agotest: centos 7 based docker live test
Jason Ish [Wed, 6 Dec 2017 20:09:40 +0000 (14:09 -0600)] 
test: centos 7 based docker live test

This is a test that runs in a Docker image. It installs
suricata-update and executes a sequence of commands looking for
failures.

The test sequence is done with Python 2 and Python 3 as provided
in CentOS 7.

8 years agoconfig: use the module singleton for config
Jason Ish [Wed, 6 Dec 2017 18:50:37 +0000 (12:50 -0600)] 
config: use the module singleton for config

This is a common Python pattern giving us a global singleton
config. Making it a bit easier than passing a config object
around everywhere.

8 years agopython 3 fixups
Jason Ish [Wed, 6 Dec 2017 18:59:37 +0000 (12:59 -0600)] 
python 3 fixups

- enable-source
- update-sources
- setup.py

8 years agomore specific exception handling when downloading
Jason Ish [Wed, 6 Dec 2017 01:28:55 +0000 (19:28 -0600)] 
more specific exception handling when downloading

Only catch and log errors related to downloading such as bad
URLs, or 404 type errors.

Let actual coding error exeptions ripple up, as a catch all
handler here can catch actual code errors causing them to only be
logged and not crash the program during testing.

8 years agofix getting cpu on certain platforms
Jason Ish [Tue, 5 Dec 2017 23:18:11 +0000 (17:18 -0600)] 
fix getting cpu on certain platforms

use platform.machine() instead of platform.processor() as its
more reliable

8 years agousage: clarify -c is for the update configuration
Jason Ish [Tue, 5 Dec 2017 22:57:37 +0000 (16:57 -0600)] 
usage: clarify -c is for the update configuration

And not the Suricata config. This is more clear in the docs
just not in the command line help usage.

8 years agoVersion 1.0.0a. 16/head 1.0.0a1
Jason Ish [Tue, 5 Dec 2017 13:20:46 +0000 (07:20 -0600)] 
Version 1.0.0a.

8 years agoUpdate source index URL to one hosted by OISF.
Jason Ish [Tue, 5 Dec 2017 14:11:21 +0000 (08:11 -0600)] 
Update source index URL to one hosted by OISF.

8 years agodoc: point pip commands at the PyPI index
Jason Ish [Tue, 5 Dec 2017 13:19:55 +0000 (07:19 -0600)] 
doc: point pip commands at the PyPI index

In prep for a release of 1.0.0a, suricata-update will be
available on PyPI.

8 years agomanifest: add sample update.yaml
Jason Ish [Tue, 5 Dec 2017 13:24:12 +0000 (07:24 -0600)] 
manifest: add sample update.yaml

8 years agoadd-source: don't use flags for options 14/head
Jason Ish [Mon, 4 Dec 2017 22:15:01 +0000 (16:15 -0600)] 
add-source: don't use flags for options

Instead making name and url positional args.

We can add a flag to change the meaning of the URL
later.

8 years agoremove sources that an enabled one replaces 13/head
Jason Ish [Mon, 4 Dec 2017 20:01:29 +0000 (14:01 -0600)] 
remove sources that an enabled one replaces

For example, when enabling et/pro, if et/open is enabled,
remove it, as its replaced by et/pro

8 years agodoc: reorg index
Jason Ish [Mon, 4 Dec 2017 19:50:52 +0000 (13:50 -0600)] 
doc: reorg index

8 years agodoc: remove-source
Jason Ish [Mon, 4 Dec 2017 19:48:54 +0000 (13:48 -0600)] 
doc: remove-source