Commit Graph

1242 Commits

Author SHA1 Message Date
Teddy Reed
8ee7e3a3b0
refactor: Move osquery/include files to appropriate places (#6557) 2020-08-11 11:54:54 -04:00
Garret Reece
1f2564f532
Add windows support to test python utility (#6550) 2020-07-10 00:57:35 -04:00
Teddy Reed
e2e9e764e6
bug: Fix typed_row table caching (#6508) 2020-06-23 13:48:36 -04:00
Zachary Wasserman
4e1d31c72a
Use 'denylist' instead of 'blacklist' in query scheduling (#6487) 2020-06-05 21:05:59 -04:00
Zachary Wasserman
86bc8bc8a3
Change compile time 'blacklist' to 'denylist' (#6488) 2020-06-05 21:03:04 -04:00
Teddy Reed
c34bdf6214
codegen: Port Jinja2 to Templite (#6470) 2020-05-31 18:36:47 -04:00
Nick Anderson
d1feab7bf2
release: adding nupkg cpack build option, updating win deployment script (#6262) 2020-05-25 12:42:06 -04:00
Teddy Reed
d8e4d5e98a
Fix package_bom table (#6457) 2020-05-22 16:30:20 -04:00
Stefano Bonicatti
52f310a5a8
First steps to remove the Buck build system (#6361)
* First steps to remove the Buck build system

* Azure Pipelines: Rename jobs for consistency
2020-04-09 01:56:21 +02:00
Teddy Reed
46a46da051
Return after check/dump requests in init (#6334) 2020-03-29 19:59:55 -04:00
Teddy Reed
bb861fb9d1
tests: Keep proc instance for test_base and test_osqueryd (#6335) 2020-03-28 12:03:58 -04:00
Stefano Bonicatti
29697f6ba8
Fix TLSConfigTests.test_runner_and_scheduler failing (#6308)
Do not close the http server after 10s if there are requests coming,
since some tests may take more than 10s to run.
Reset the timer each time a request is received by the server instead.
2020-03-26 20:22:02 -04:00
Stefano Bonicatti
7ff9cf5a3f
Update osquery-toolchain to the 1.1.0 version (#6315)
This new toolchain contains a newer LLVM version (9.0.1),
a fix for the scan-build scripts and it keeps the LLVM static libraries,
necessary to implement the new BPF framework and tables.
2020-03-24 16:19:32 +01:00
Stefano Bonicatti
0409360ace
Fix assert used to check the retcode in test_5_daemon_sigint (#6318)
Partially addresses #6300
2020-03-20 08:37:25 -04:00
scoders-tob
3eae135bc1
Adding docker_container_fs_changes table (#6178)
* adding docker pip package to dockerfile

* adding docker fs changes table

Co-authored-by: scoders <sahil@cs.toronto.edu>
2020-02-24 01:00:38 +01:00
Antoinette
57ffaa89fc
Updating memory_info_ex function call to non-deprecated function (#6259)
Swap profile.py to non-deprecated memory_info
2020-02-20 15:59:39 -05:00
prateeknischal
b9c55aec25
Fix codegen template for extension group (#6244)
The template has a reference to waitThenShutdown
which does not exist in the definitions.
Instead of that, a function, waitForShutdown is defined in the
osquery/system.h which should have been used.
This causes compilation to fail in case of building an extension.
This commit fixes that function call in the template.
2020-02-18 17:49:14 +01:00
Alessandro Gario
498d64e9eb
http_client: Improve certificate verification (#6197) 2020-02-12 14:45:12 -08:00
Teddy Reed
d393d12f5c
Refactor and simplify shutdown logic (#6144)
The windows documentation mentions that ExitThread should not be
used in C++ code. When debugging these exit flows I saw exceptions
when running dtors.

When reviewing the shutdown code for Windows and POSIX there was a
lot of complexity. This change allows any part of code to request
a shutdown and simplifies the response.

We should expect the main thread to call ::waitForShutdown.
The exception is the shell, which waits in a repl.
2020-02-10 20:26:45 -05:00
scoders-tob
ccffaf7d8a
replacing boost::regex with std::regex for SQL StringExtensions (#6227) 2020-02-05 15:08:45 -05:00
Stefano Bonicatti
d0b42a98e2
Fix all TLS tests and framework (#6170) 2020-02-03 07:50:25 -08:00
Stefano Bonicatti
ab47c6db6f Fix format folder exclusion and format check self test (#6201) 2020-01-27 14:21:38 -08:00
Stefano Bonicatti
0d779a7160 Fix format_check.py failing on Windows with Python 3.7 (#6188)
- The output from the git subprocess has to be decoded from bytes
  to str before passing it as an argument of a new subprocess.

- Use the python interpreter of the current script to run git-clang-format.py.
2020-01-18 15:39:01 -05:00
calve
600f21dcfb flags: Implement enable_tables (#6150)
Adds an ``--enable_tables`` CLI flag to specify a limited set of
tables to expose. This is the contrary of ``--disable_tables``.
2020-01-17 18:59:20 -05:00
Teddy Reed
fce0059c5e
config: Fix JSON format assumptions in file_paths parser (#6159) 2020-01-16 20:50:54 -05:00
Teddy Reed
5047015535
website: Update the website specs formatting code genapi (#6124) 2020-01-12 01:44:46 -05:00
Stefano Bonicatti
46430df8c5 Restore WEL logger plugin (#6164)
- Restore the ability of osquery to log to the Windows Event Log.
- Restore the information normally shown on the Details tab
of the Properties of the osquery executable.
- Add and refactor utility functions to parse and transform
  the osquery version, needed by the Windows resource files
  and packaging.
2020-01-12 01:42:44 -05:00
Stefano Bonicatti
36a66ff6ab Include header files in the test of format-check.py (#6157)
If we don't include them and if the commit we're on requires formatting
on a header file, the test will fail.
We don't want it to fail because it's not the job of this test
to verify that the commit is properly formatted.
Moreover, it just makes sense to test that the formatting script
can properly reach all files it has to.
2020-01-03 19:57:27 -05:00
Stefano Bonicatti
4af1bd5ef1 Fix regression in oss-fuzz after moving the test config files (#6132) 2019-12-18 13:17:58 -05:00
Stefano Bonicatti
532435d15e Restore test_osqueryd.py test (#6116)
Co-Authored-By: SS <sahil.suneja@trailofbits.com>
2019-12-12 21:06:18 -05:00
Stefano Bonicatti
668a1d86e6 CMake: Future proof Python finding mechanism (#6120)
CMake 3.16 doesn't set Python3_EXECUTABLE as cache variable anymore,
it has changed to _Python3_EXECUTABLE which is for internal use.
The module returns Python3_EXECUTABLE as a local variable,
so we share that value through a new custom cache variable,
OSQUERY_PYTHON_EXECUTABLE.
2019-12-11 22:32:08 -05:00
Zachary Wasserman
039d7353cf
Use cert bundle in repo for make_windows_package script (#6114)
Instead of using the path to an openssl provided cert bundle (which no
longer exists in recent installs of openssl from Chocolatey), use the
cert bundle already stored in the repo.

Fixes #6109
2019-12-10 15:09:20 -08:00
Teddy Reed
2933614301
tables: Remove INDEX requirement for ADDITIONAL option (#6104)
We do not need an explicit INDEX column for ADDITIONAL to work.
If the ADDITIONAL option is set the constraint should be passed
into the virtual table context.
2019-12-10 15:43:35 -05:00
Stefano Bonicatti
e7cef1a906 Prepare CMake and Python framework for Python tests
test_base.py received several fixes and now supports and requires
a custom folder where to find the config files that the tests need.
It has been also updated to use Python 3.

Fixed the gen_api function in genapi.py missing the path to the spec
file when evaluating blacklisted tables.

Co-Authored-By: SS <sahil.suneja@trailofbits.com>
2019-12-07 20:51:09 -05:00
Stefano Bonicatti
8ab9a798eb Change and add some python packages in the CI Dockerfile
- Add the bdist_wheel package to have pip optimize packages.
- Update Python 2 packages to Python 3
- Use pexpect==3.3
2019-12-07 20:51:09 -05:00
Stefano Bonicatti
515704954c Move the test config files in their own directory
This is to have better separation between them and the python tests.
BUCK files have been updated accordingly.

Changes to the internal generateCopyFileTarget function were needed.
The function now supports a base folder to be set so that the regex or file path
is appended to that base path, without having it included in the destination.
It will also not use a library target anymore, but a custom one so
that's possible to set properties with custom names.

Use only one copy target to copy test config files instead of having
multiple that overlaps.
It may give issues when copying and tests in the end will need all of
them.
2019-12-07 20:51:09 -05:00
Teddy Reed
f3b3cd1c7d
linux: Update systemd service to use KillMode=control-group (#6096) 2019-12-05 20:42:22 -05:00
Teddy Reed
00f43e9915 config: Add more checks for pack JSON (#6071) 2019-12-03 18:22:54 -08:00
Brendan Shaklovitz
b18f4315a4 Fix python3 deprecation warning (#5977) 2019-11-26 16:57:27 -05:00
Teddy Reed
19d4e3fc78
docs: Remove references to old osquery kernel extension (#6051) 2019-11-19 00:23:47 -05:00
Stefano Bonicatti
92f67a5f5b Prefer 7zip when installing Strawberry Perl (#6031)
Use a faster method to download and a faster method to
extract zip archives, when available.
2019-11-11 09:53:33 -05:00
SS
39405447f9 formatting functions py2->3 (PR #6011) 2019-11-09 01:26:45 +01:00
SS
bc62339656 adding utf8 locale to dockerfile (PR #6011) 2019-11-09 01:26:45 +01:00
kumarak
b19eecbe0d Use function waitThenShutdown to wait for signal to shutdown (#6016) 2019-11-08 07:35:24 -05:00
Stefano Bonicatti
3c3c7a7d29 Use a custom defined manifest for executables on Windows (#6010)
This uniforms the manifest that gets embedded using msbuild
or Ninja, while also letting us customize it if necessary.
2019-11-06 19:11:27 -05:00
Teddy Reed
818c05ce4a cleanup: Remove old scripts and tooling (#5983) 2019-11-05 02:30:10 +01:00
Alessandro Gario
7fee358178 CMake: Update the OpenSSL formula (#5976) 2019-11-01 21:25:14 -04:00
Teddy Reed
b47e34936c
cpack: Add Debian copyright file and Augeas license (#5951) 2019-10-29 19:03:27 -04:00
Tom Ritter
3c384bf392 Update osqueryfuzz_config_dict.sh to correct tests and packs paths (#5963) 2019-10-29 19:01:12 -04:00
Tom Ritter
abd16c9b1f Update osqueryfuzz_config_corpus.sh to correct the path to the tests directory (#5955) 2019-10-28 20:19:00 -04:00