1021 Commits

Author SHA1 Message Date
Kent Ma
1523d58429 Remove use of entitlements field for the santad build rule (#615)
* Remove use of entitlements field for santad

* Create a local keychain instead of using the system keychain and drop sudo from most of the build stages
2021.7
2021-09-28 12:48:09 -04:00
Kent Ma
81049db170 Deflake SNTApplicationTest by tracking subscriptions to specific event types (#614)
* Switch to waitForExpectations in tests

* Change mock es_subscribe to note specific events we're ready for
2021-09-27 10:40:15 -04:00
Russell Hancox
c110245701 Project: fix exporting of SantaCache header (#612) 2021-09-23 12:32:41 -04:00
Russell Hancox
d7a56b9bd4 Project: fix some BUILD file lint (#611) 2021-09-23 12:03:23 -04:00
Russell Hancox
4bb5804a6f santactl/sync: Catch rare crash in FCM parsing (#609) 2021-09-23 10:56:57 -04:00
Russell Hancox
e68fb7235a Metric: Fix formatting of SNTMetricFormatTestHelper (#608) 2021-09-23 06:53:06 -04:00
Pete Markowsky
f93e7ef879 Refactored metric service tests to use a common helper. (#607)
This refactors the SNTFormat tests to use the SNTMetricSet to generate the
test data. This keeps the metric service and the SNTMetricSet in sync and
reduces repeated data.
2021-09-22 16:56:57 -04:00
Kent Ma
f472f4821c Create block builder for ES Messages and clean up tests (#606)
Create block builder for ES Messages and clean up tests
2021-09-22 15:48:24 -04:00
Pete Markowsky
1c97761038 Initial commit of santametricservice. (#605)
Initial commit of santametricservice.

The santametricservice is an XPC helper service to write metrics. It consists of Formatters and Writers. This initial commit only has support for the rawJSON format and writing to a file.

This is a new daemon to be included. Docs and packaging will be updated in future PRs.

Co-authored-by: Russell Hancox <russellhancox@users.noreply.github.com>
2021-09-22 14:49:30 -04:00
Pete Markowsky
e569a684b7 Add initial configuration options for barebones metric service (#604)
Add initial configuration options for barebones metric service.
2021-09-21 13:36:02 -04:00
Pete Markowsky
66c32dc526 Added an XPC interface for the Metric service. (#603) 2021-09-20 18:14:39 -04:00
Kent Ma
075d3cbc11 Include an integration test setup and fixture with moroz (#602) 2021-09-20 11:35:12 -04:00
Adam Sindelar
340326df8a Remove the hiring banner (#600) 2021-09-10 08:09:06 -04:00
Kent Ma
f52edd2a76 Explicitly include the TeamIdentifierPrefix to santad's entitlement (#599) 2021-09-09 11:24:49 -04:00
Kent Ma
11c247e33a Add entitlements to the santad and Santa build rules (#598) 2021-09-09 09:36:42 -04:00
Ryan Diers
a859b9b341 Docs: Add Rudolph to sync server list (#597) 2021-09-08 19:41:27 -04:00
Kent Ma
c190f1f52d Add tulsi project (#596) 2021-09-08 14:50:57 -04:00
Pete Markowsky
87dc191494 Rewrote ci.yml workflow to parallelize steps. (#593)
Build and test steps were taking more than 5 minutes to run so this cleans up
the workflow and parallelizes it.
2021-09-02 17:21:36 -04:00
Pete Markowsky
3a19591822 Made CI build and test steps conditional. (#592)
This changes the workflow steps to execute conditionally e.g. if you only modify
documentation it won't run the build, test, and coverage steps.
2021-09-01 16:47:19 -04:00
Kent Ma
b225c0740e Raise the timeout delay for tests (#591) 2021-08-25 16:46:26 -04:00
Russell Hancox
d1fffb4636 README: Remove ReadTheDocs link (#589) 2021-08-25 12:50:07 -04:00
Kent Ma
9d7ca62e46 Pin to 0a2c39c020 (#588)
This allows us to run tests on ARM.
2021-08-19 12:01:45 -04:00
Kent Ma
2a6073a9a1 Upgrade bazel rules_apple to 0.31.3 (#587) 2021-08-18 17:04:49 -04:00
Russell Hancox
296f06582b Project: delete obsolete ReadTheDocs config (#586)
We haven't used ReadTheDocs for >6m
2021-08-18 15:40:34 -04:00
Russell Hancox
0e27dab4c6 Project: remove xcode projects, they're stale (#584) 2021-08-18 15:05:55 -04:00
Russell Hancox
256836d7f8 Docs: Switch themes, update config, fix redirect (#583) 2021-08-18 10:58:12 -04:00
Russell Hancox
b117d8106e Project: Update deps in WORKSPACE to be reproducible. (#582)
This removes a lot of warnings when starting in a clean workspace
2021-08-17 17:20:30 -04:00
Russell Hancox
c980223215 Project: remove py2 forcing, drop deprecation warnings back to warning (#581) 2021-08-17 16:59:27 -04:00
Russell Hancox
635b33ebf9 Project: Update coverage link in README (#580) 2021-08-17 15:53:07 -04:00
Kent Ma
b6f35c9b9f Add actual test binaries to the repo (#579) 2021-08-17 15:02:14 -04:00
Kent Ma
796109cc60 Adding cert rules and testdata (#578) 2021-08-17 14:26:09 -04:00
Russell Hancox
38f580de72 CI: Re-org CI workflows, ignore /Applications in coverage (#577) 2021-08-17 14:08:02 -04:00
Kent Ma
c7a58c77e7 Add missing ES Auth response to AUTH_RENAME (#576)
* Add missing ES Auth response to AUTH_RENAME
* Added unit test cases for benign paths
2021-08-17 12:10:43 -04:00
Kent Ma
9a4fe782d7 Bump version -> 2021.7 (#575) 2021-08-16 16:04:24 -04:00
Kent Ma
fbb5f3728f Include license in BUILD file (#574) 2021-08-16 12:55:01 -04:00
Pete Markowsky
24b96c4798 Added types for recording and storing performance metrics. (#567)
* Added types for recording and storing performance metrics.

This adds SNTMetricSet and various gauge and counter types to allow for
exporting metrics such as CPU,Memory usage and other properties that are useful
for tracking reliability and debugging.

This is the first commit of a series to add support for monitoring systems.

Co-authored-by: Kent Ma <tnek@google.com>
2021-08-13 13:26:45 -04:00
Kent Ma
1edf6d9200 Enable -Werror -Wall on our build rules (#572)
* Reorder init lists for -Wreorder-init-lists

* Add nullability annotations to the rest of EndpointSecurityTestUtil

* Added fake uses for -Wunused-variable

* Corrected signed/unsigned int conversions in SNTPrefixTree

* Explicitly convert implicit conversions in Santacache

* Set bazelrc to -Werror -Wall
2021-08-13 11:31:41 -04:00
Kent Ma
ac1f8ea1b8 Add an extra return on the rename case (#570) 2021-08-12 13:48:38 -04:00
Kent Ma
9923f601b6 Prevent Overwrite of Santa Databases (#569) 2021-08-12 10:38:27 -04:00
Kent Ma
471ae89406 Switch the CI build steps to run all unit tests and coverage first (#568) 2021-08-11 14:03:05 -04:00
Kent Ma
54d6653973 Include SNTEndpointSecurityManagerTest in the main test_suite (#566)
* Include SNTEndpointSecurityManagerTest in the main test_suite and clean it up.

This commit (1) adds es_unsubscribe and es_delete_client to our ESF shim
to fix the test segfaulting, and (2) cleans up the unit tests themselves by
breaking out the timeout test from the regular unlink test
2021-08-11 11:42:55 -04:00
Kent Ma
27ee66597b Correctly calculate coverage by calling blaze coverage on individual tests (#565) 2021-08-11 09:17:27 -04:00
Kent Ma
10f2d852f5 Add functional test for executing a binary on SNTApplication. (#562)
This adds a full functional test for starting up an SNTApplication
(with as few mocks as possible) and executing it with a directly
recorded & collected EndpointSecurity event.

This also fixes a potential race condition and segfault on Santa startup: due
to es_subscribe being called first, it's possible for an es event to arrive
before listenForDecisionRequests or listenForLogRequests are called,
causing the SNTEndpointSecurityManager callbacks to call a nil pointer.
2021-08-10 14:42:21 -04:00
Kent Ma
1fcb63dc92 Add coveralls CI rule and lcov generator (#564)
Adding coveralls so that test coverage can be easily displayed and checked
2021-08-10 14:41:14 -04:00
Kent Ma
7944f681f8 Test util library for mocking EndpointSecurity. (#560)
* Test util library for mocking EndpointSecurity.
2021-07-14 10:49:10 -04:00
Tom Burgin
e3aedc92ba bump version (#559) 2021-06-16 13:20:10 -04:00
Kent Ma
d2b6c2b6c2 Update .clang-format and apply to existing files. (#558) 2021-06-15 09:47:31 -04:00
Tom Burgin
d026989dfb santactl: remove extra check (#557) 2021-06-11 15:43:08 -04:00
Tom Burgin
e7a8e9b6ac santactl: use host instead of http address for reachability (#556) 2021-06-11 15:13:50 -04:00
Russell Hancox
1d9af01353 Project: Bump dependency versions, fix reload command (#554)
* Project: Bump dependency versions, fix reload command

The reload command would fail if you used multiple compilation modes for
building as it would try extracting the versions from both comp modes.

The dependency bump includes a fix for #553
2021.5
2021-05-03 21:37:42 -04:00