Commit graph

17337 commits

Author SHA1 Message Date
Don Appleman
d2968c7f59 Added #include <algorithm> to fix a build problem 2011-04-01 13:01:41 -05:00
Jon Siwek
2d17ca0942 Generated script docs now have a new summary section.
It's a table listing all the identifiers in the script's public interface
and an optional, brief (one-sentence) description of each.
2011-04-01 12:30:22 -05:00
Jon Siwek
cf45ae19e1 Generated script docs can now link to the original source.
The original bro source file needs to be copied to the same directory
that Sphinx outputs the rendered html.
2011-03-30 10:24:44 -05:00
Robin Sommer
1e54dfba34 Updating submodule(s). 2011-03-29 21:53:53 -07:00
Robin Sommer
bc39f9f048 Porting the istate tests to btest.
Note that currently most of them don't pass because (i) the code
adding the environment variable for seeding the RNG has not been
merged into master yet; and (2) Broccoli to Bro communication is
currently broken because of the int64 problem. Once these are fixed,
then baselines need to be recreated and checked.

Therefore, the istate tests aren't activated in btest.cfg yet.
2011-03-29 21:46:06 -07:00
Robin Sommer
3562682ac9 Merge remote branch 'origin/topic/appleman/unittests'
Note that I've shifted things around a little bit. The traces are now
in Traces/* (capital T), and the known-hosts-test in policy/*.
Scripts/ was meant just for helper shell scripts for the testing
framework. Also, I've not yet included "policy" in btest.cfg as a
TestDir because the corresponding script is not yet in master.

* origin/topic/appleman/unittests:
  Test, trace file, and baseline for testing the known-services policy script
  Baseline for KNOWN-HOSTS tesT
  Initial drop of known-hosts unit test, with tracefile and directory structure, as well as c ouple of files pulled from Robin's logging branch.
2011-03-29 21:43:34 -07:00
Jon Siwek
090ce2d03c Fix generated script docs displaying functions twice.
A function prototype can be declared separately from where it's defined;
the doc framework should now recognize them as the same and combine
reST documentation associated with either case if both are present.
2011-03-29 16:54:16 -05:00
Seth Hall
4f1eca35d0 Small tweaks to move where notices are handled. 2011-03-29 17:02:50 -04:00
Seth Hall
b11dc68aab Adding some &log attributes now that it's required to get output. 2011-03-29 16:45:28 -04:00
Seth Hall
4086be7550 Added the script that preloads a selected subset of the http/* scripts. 2011-03-29 16:44:57 -04:00
Seth Hall
5ea7a2b22e Updating the http.bro to take better advantage of new features.
* The http.bro script only loads other scripts now.
* http/base.bro configures the analyzer in the core
  and does minimal state collection.
* http/base-extended.bro adds extra state collection
  that may not always be desired.
* http/detect-intel.bro is where intelligence based
  detection that we ship will take place.
* http/detect.bro is where behavioral and scripted (known)
  actions will be detected.
* http/utils.bro are http specific utility functions
* http/var-extraction* scripts add cookie and uri key values
  to the base state collection and logging.  They are also
  maintained in a vector so that order is presevered.

The var-extraction* and base-extended scripts are good examples
of how the base script extension model works.

This also has an inital try at storing the "Info" state table
in the connection record.
2011-03-29 16:44:37 -04:00
Jon Siwek
94ac3f3c23 Revise the way "port analysis" and "packet filter" documentation is generated.
They now appear at the bottom of generated docs.

Also, a "more info" link is added which can point to an arbitrary location
in any reST document processed by Sphinx.
2011-03-29 14:19:33 -05:00
Jon Siwek
a9810d21a9 Generated docs now have xref links for attribute values that are enums. 2011-03-29 12:10:08 -05:00
Seth Hall
20d909826b Forgot to move the CMakeLists.txt file over to the new policy directory. 2011-03-29 10:22:42 -04:00
Seth Hall
4943a87205 Merge remote branch 'origin/topic/robin/logging-internals' into topic/policy-scripts-new 2011-03-29 10:21:01 -04:00
Seth Hall
f66ad1cffd Regenerated the Mozilla CA bundle without the untrusted server authentication certs.
Certs intended for email protection and code signing have been removed
as well due to the change.
2011-03-29 10:03:20 -04:00
Robin Sommer
1cbde793d8 Merge branch 'topic/robin/extend-records' into topic/robin/logging-internals
Includes some fixes for using &log with record-extension.
2011-03-28 18:56:19 -07:00
Robin Sommer
38a1aa5a34 &log keyword, and vector logging.
The &log keyword now operates as discussed:

    - When associated with individual record fields, it defines them
      as being logged.

    - When associated with a complete record type, it defines all fields
      to be logged.

    - When associated with a record extension, it defines all added
      fields to be logged.

    Note that for nested record types, the inner fields must likewise
    be declared with &log. Consequently, conn_id is now declared with
    &log in bro.init.

Vectors are now allowed to be logged and will be recorded as an
ordered set of items.
2011-03-28 18:14:05 -07:00
Seth Hall
7faf3e0f3b Complete rewrite to SSL analyzer.
* I haven't removed handwritten analyzer code yet although it isn't built anymore.
* The ssl.bro script is just an example and doesn't keep any state yet.
2011-03-28 12:15:53 -04:00
Don Appleman
ebb4eb552a Test, trace file, and baseline for testing the known-services policy script 2011-03-25 16:17:27 -05:00
Jon Siwek
60a7dc6f55 Autodoc framework now tracks script constants
Also, it's starting to attempt to describe more complex types
of initial values.
2011-03-24 16:56:25 -05:00
Jon Siwek
2490878656 Another revision for autodoc tracking of public vs private interfaces
A script's public API wasn't simply definable as identifiers
for which ID::IsGlobal() is true, e.g. an unexported identifier with
SCOPE_MODULE will still pass that test and (incorrectly) be considered
public API.

Also, generated reST now omits empty interface sections.
2011-03-24 14:04:30 -05:00
Don Appleman
c81f1889a5 Baseline for KNOWN-HOSTS tesT 2011-03-24 13:28:48 -05:00
Jon Siwek
2e88c5100c Revise autodoc tracking of public vs private script interfaces
A bro script's public interface is taken to mean any identifier declared
in the global scope that optionally is exported from some namespace/module.
Or more simply: ID::IsGlobal()
2011-03-24 12:32:32 -05:00
Don Appleman
638eb2f8eb Initial drop of known-hosts unit test, with tracefile and directory structure, as well as c ouple of files pulled from Robin's logging branch. 2011-03-24 11:27:21 -05:00
Jon Siwek
c2f0332b5f Removing lexical scanner recognition of "## Author:" comments.
This functionality is better done manually by the script writer
embedding reST into the script summary section (##! comments).
This allows flexibility in choosing between different methods
to convey the same information (e.g. ":Author: <author>" or
the ".. codeauthor:: <author>" directive that Sphinx
configurations can recognize).
2011-03-24 09:51:47 -05:00
Jon Siwek
8b79971e21 Fix auto-generated reST :doc: references to strip .bro file suffixes.
It's allowed for a script to "@load example.bro", but Sphinx doesn't want
that file extension for the purposes of generating cross-referencing links
to other documentation.
2011-03-23 16:59:41 -05:00
Jon Siwek
037a6906af Canonicalize "##" and "## " stylized comments, revise record/enum documentation tracking
The documentation framework now sees "##Text" and "## Text" as
equivalent documentation comments.  This prevents unintentional
indentation in the generated reST as a result of the later style, but
still allows embedded reST markup that relies on indentation of more
than two spaces to work as expected.

Comments associated with record fields and enums values are able
to span multiple "##"-stylized comments, allowing for more robust
reST markup to be embedded.

The documentation framework now tracks record fields through
a new CommentedTypeDecl subclass of TypeDecl that the parser constructs
in parallel with the real TypeDecl.
2011-03-23 16:08:18 -05:00
Seth Hall
6dd142aa1f More updates to notice framework. 2011-03-23 11:38:26 -04:00
Seth Hall
6ba30eae3b Initial script for mime.bro rewrite. 2011-03-23 00:30:02 -04:00
Jon Siwek
bbe7c98ab3 Major reformatting of auto-generated reST documentation.
Introduces reST directives and roles in a "bro" domain that Sphinx
will be taught to recognize.
2011-03-22 16:05:59 -05:00
Seth Hall
b514c9cf89 Initial version of smtp.bro 2011-03-22 16:23:04 -04:00
Seth Hall
6c8ac11660 Bug fix and new all.bro script for loading all base scripts. 2011-03-22 11:56:06 -04:00
Seth Hall
38a57f6d35 Attribute misspelling. 2011-03-22 11:48:49 -04:00
Seth Hall
b2ea6ecf45 Merge remote branch 'origin/topic/robin/logging-internals' into topic/policy-scripts-new
Conflicts:
	src/Expr.cc
2011-03-22 11:42:54 -04:00
Robin Sommer
05f2104fec Merge branch 'topic/robin/record-coercion' into topic/robin/logging-internals
* topic/robin/record-coercion:
  Fixing a bug with nested record ctors.
  Enabling automatic coercion from record type A to be B as long as A has all the types that B has.

Conflicts:
	src/Expr.cc
2011-03-21 17:24:30 -07:00
Robin Sommer
871eff9f90 Updating submodule(s). 2011-03-21 16:35:22 -07:00
Robin Sommer
12c9c947f8 Merge remote branch 'origin/topic/jsiwek/config-file-clobber-fixes'
* origin/topic/jsiwek/config-file-clobber-fixes:
  Changes to the way user-modifiable config files are installed.

Conflicts:
	aux/broccoli
	aux/broctl
2011-03-21 16:29:17 -07:00
Seth Hall
460b10cdf5 Beginning of ssl.bro rewrite. Far from working.
We may be fixing up the binpac ssl analyzer and getting
rid of the C++ one.  As I look closer and closer and at
C++ analyzer, I'm less impressed with the events it
outputs due to it maintaining state differently in the
core than most other analyzers.  Subsequently, the
events that it generates are also significantly
different from those of other analyzers.
2011-03-21 16:56:59 -04:00
Jon Siwek
384fa03c26 Revising notice, port analysis, packet filter, auto-generated documentation.
They're now all optional sections -- if a given bro script doesn't use the
functionality, then the documentation doesn't mention anything about it.
2011-03-21 15:08:39 -05:00
Jon Siwek
e0a77cb794 Auto-doc framework now handles multiple script authors more conveniently. 2011-03-21 14:03:11 -05:00
Seth Hall
b485bd05ad Revert "Merge commit '7526058071' into topic/policy-scripts-new"
This reverts commit 99c1c25e26, reversing
changes made to 04ea1a2f50.
2011-03-21 14:50:22 -04:00
Jon Siwek
5fbcde7344 Teach Desc class how to (optionally) use spaces for indentation.
And (to be consistent with current conventions for reST documentation)
update places in the auto-documentation-generation framework
where tabs were used in the generated reST.
2011-03-21 13:49:53 -05:00
Jon Siwek
e491caeeb7 Add note to auto-generated reST about not editing it directly 2011-03-21 12:49:54 -05:00
Seth Hall
99c1c25e26 Merge commit '7526058071' into topic/policy-scripts-new
Conflicts:
	src/Expr.cc
2011-03-21 11:01:45 -04:00
Seth Hall
04ea1a2f50 More conn.bro changes to improve the logging 2011-03-18 00:57:24 -04:00
Seth Hall
42df07a889 More updates to conn.bro to adjust to new logging framework. 2011-03-18 00:51:48 -04:00
Seth Hall
b47058ef78 Revert "Merge remote branch 'origin/topic/robin/record-coercion' into topic/policy-scripts-new"
This reverts commit b9a63c835f.
2011-03-18 00:27:11 -04:00
Seth Hall
b9a63c835f Merge remote branch 'origin/topic/robin/record-coercion' into topic/policy-scripts-new
Conflicts:
	src/Expr.cc
2011-03-18 00:07:29 -04:00
Robin Sommer
7526058071 Fixing a bug with nested record ctors.
If a record field was initialized with another record ctor, there was
no record type coercion in place in case of a type mismatch.
2011-03-17 17:19:46 -07:00