Commit graph

2499 commits

Author SHA1 Message Date
Jon Siwek
bd523f2905 Automatic reST doc markup for event/function params/return comments
For a bro script that is documented like:

  ## ...
  ## bar: ...
  ## Returns: ...
  global foo(bar: string): string;

the generated reST documentation will automatically substitute meaningful
markup (reST field lists) for the parameter and return type comments
2011-04-04 12:29:48 -05:00
Seth Hall
85b8515928 Small rework to FTP.bro 2011-04-04 12:01:12 -04:00
Seth Hall
10247abbbc More HTTP rework.
* New script: http/file-extract.bro
* New script: http/file-ident.bro
* New script: http/file-hash.bro
* Lot of cleanup.  The output logs are better than before.
2011-04-04 12:00:07 -04:00
Seth Hall
7cffd0b1e6 Beginning of signature.bro rewrite. 2011-04-04 11:54:57 -04:00
Seth Hall
60dae5bba9 More FTP rework. 2011-04-04 11:54:25 -04:00
Robin Sommer
68a30a0b5a Updating submodule(s). 2011-04-01 16:29:15 -07:00
Robin Sommer
03c0d587a4 Removing code for unused hash functions. 2011-04-01 16:09:28 -07:00
Robin Sommer
4677174aa4 Merge remote branch 'origin/topic/robin/comm-ssl'
The merge does not include the hack to switch back to 32-bit for
Broccoli. It does contain a version of the SSL tests converted to
btest, which however doesn't pass yet (as some of the others as well)

* origin/topic/robin/comm-ssl:
  Fixing crashes when SSL is not configured correctly.
  Adding a test for SSL-based communciation to the istate testsuite.
2011-04-01 15:57:07 -07:00
Robin Sommer
a3a075174b Merging in 'topic/robin/cleanup-rewriter'.
Removing everything related to trace rewriting.

(I wasn't too careful in ensuring that I catch everything in the
scripts; Seth is working on those anyway.)

(Merging by cherry-picking the corresponding commit, as the branch was
accidentally made off of the logging stuff).
2011-04-01 15:23:50 -07:00
Robin Sommer
ec1b2b4d2a Merge branch 'topic/robin/cleanup-dfa-cache'
* topic/robin/cleanup-dfa-cache:
  Removing the EXPIRE_DFA_STATES code.
2011-04-01 14:52:27 -07:00
Robin Sommer
3a5384907f Merge branch 'topic/robin/cleanup-active-mapping'
* topic/robin/cleanup-active-mapping:
  Removing active mapping.
2011-04-01 14:42:22 -07:00
Jon Siwek
758172120b Revising format of initialization values in generated script docs.
Fixed the obvious things: reduced the space taken up by empty tables
and allowed record values to span multiple lines (one for each record field).
2011-04-01 15:21:15 -05:00
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