• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..12-Nov-2020-

auditor/H03-May-2022-4,8983,690

bin/H12-Nov-2020-6851

scripts/H12-Nov-2020-1,7481,250

summary/H12-Nov-2020-377361

DEPSH A D07-Nov-202050 53

OWNERSH A D07-Nov-202086 54

README.mdH A D07-Nov-20202.4 KiB4942

sample_traffic_annotation.ccH A D07-Nov-202010.3 KiB245213

traffic_annotation.protoH A D07-Nov-20208.4 KiB190165

README.md

1# Network Traffic Annotations
2Network traffic annotations provide transparency and auditability for the data
3that Chrome sends to the network. For an introduction, please see
4`docs/network_traffic_annotations.md`.
5This folder provides tools to ensure that every operation in the code base that
6requires annotation, is annotated, and annotations are sound and complete.
7
8# Traffic Annotation Auditor
9This is the main executable for all the tests. It runs Traffic Annotation
10Extractor python script to check the repository, extract annotations, and
11perform required tests and maintenance. See more details in
12`tools/traffic_annotation/auditor/README.md`.
13
14# Traffic Annotation Extractor
15Traffic Annotation Auditor uses this python script (located in
16`tools/traffic_annotation/scripts/extractor.py`) to parse the code and extract
17required data for testing and maintenance.
18
19# Building the Checkers
20We do not want every developer to have to build the auditor, and so we store
21pre-built binaries in a Google Cloud Storage bucket and retrieve them via
22gclient hooks. The binaries are in `tools/traffic_annotation/bin/[platform]`
23folder. To roll new versions of the binaries, please see
24`tools/traffic_annotation/bin/README.md`.
25
26# Automatic Annotation Tests
27Network traffic annotations are tested in commit queue using
28`tools/traffic_annotation/scripts/check_annotations.py`. This test is currently
29run on Linux and Windows trybots, but may expand in future to other platforms.
30To perform this test fast enough for a trybot and to avoid spamming the commit
31queue if an unexpected general failure happens (see next item), trybot tests are
32run in error resilient mode and only on the changed files. A more complete test
33runs on an FYI bot using
34`tools/traffic_annotation/scripts/traffic_annotation_auditor_tests.py` and
35alerts if tests are not running as expected.
36
37# Emergency Brake
38In the event that clang changes something that requires the tool to be rebuilt
39(or for some other reason the tests don't work correctly), please disable the
40trybot test by setting the `TEST_IS_ENABLED` flag to False in
41`tools/traffic_annotation/scripts/check_annotations.py`, and file a bug and cc
42the people listed in OWNERS; they'll be on the hook to rebuild and re-enable the
43test.
44
45# Annotations Summary
46`tools/traffic_annotation/summary/annotations.xml` keeps an up to date summary
47of all annotations in the repository. This file is automatically updated by
48Traffic Annotation Auditor.
49