Commit Graph
85 Commits
Author SHA1 Message Date
David McDonald 2199375dd5 Tests: Add symlinkscan specific test 2025-04-15 10:49:43 -05:00
David McDonald 32e9cee6dd Tests: Add Symlinkscan generic test
This should be enough to prevent serious regressions that break all
output.
2025-04-15 10:49:43 -05:00
David McDonald 5befbf8629 Tests: Fix MFTScan testdata
These test values needed updating now that the `LayerData` type is used
and presents the data a little differently than before.
2025-04-02 14:08:18 -05:00
David McDonald 0b1bbb87ee Windows Tests: Update userassist JSON output
The new layer data type renders the output a little differently, and the
plugin also seems to render 'N/A' for a missing value where previously
it was an empty string.
2025-04-02 09:36:07 -05:00
David McDonald 296cb3c113 Code Analysis: Give pass to 'volatility3'
Also moves some code into a private method with a docstring in the
visitor class.
2025-03-29 15:49:33 -05:00
David McDonald a3353a3cb6 CI Testing: Renames script and updates job name 2025-03-29 15:49:33 -05:00
David McDonald e62cee391a Testing: Adds validation of vol3 imports in check script
This checks `ast.ImportFrom` statements to see if anything other than
modules are being imported in this way. It enumerates all instances of
this and suggests a fix.
2025-03-29 15:49:33 -05:00
David McDonald 6452fc18bd Tone down language severity in messages 2025-03-28 15:39:09 -05:00
David McDonald d7695ab9cf Simplify error message output 2025-03-28 15:36:54 -05:00
David McDonald 46e3b8ffdb Check for 'hidden' attribute when determining classes to validate 2025-03-28 15:22:37 -05:00
David McDonald 196556eab3 Test: Allow for other types of coding style violations 2025-03-28 15:18:22 -05:00
David McDonald 27e59263a6 Docstring: explain version-checking script
This documents the general behavior and expectations of the
version-checking CI script.
2025-03-28 13:22:01 -05:00
David McDonald 9f024cf0f4 Refactor: use builtin ast lib instead of treesitter
Instead of using the tree-sitter third party library, this uses Python's
`ast` module to parse the source code and traverse the tree with a
visitor pattern. This is preferred because it's native to the language
itself, and Python developers are more likely to be familiar with it.
The traversal also handles nested scopes better than the prior
implementation. For example, classes that are declared inside of other
classes can now be looked up even though they don't exist at the top
level of the module namespace, since any time a class definition is
entered, that class is pushed to the top of a stack that can be examined
when visiting inner classes.

This also adds lots of log messages at different levels, plus a command
line argument for specifying verbosity, which should help with debugging
down the line.
2025-03-28 13:22:01 -05:00
David McDonald 2ad1536b4e Testing: Verify VersionRequirements
This adds a script and GitHub action to the `test` directory that
dynamically imports all modules in `volatility3`, searches for usages of
`VersionableInterface` objects within classes that inherit from
`ConfigurableInterface` but don't enumerate the used component as a
requirement in `get_requirements()`, and returns -1 if any violations
are found.

Fixes
2025-03-28 13:21:10 -05:00
Abyss Watcher dca182dc72 trigger tests 2025-03-26 15:59:35 +01:00
Abyss Watcher b80a34110e adjust thrdscan 2025-03-26 14:41:05 +01:00
Abyss Watcher d70d8820a9 use winxp against scanner plugins (performances) 2025-03-25 11:41:28 +01:00
Abyss Watcher 951d1f6c48 fix pstree data test name 2025-03-12 16:55:20 +01:00
Abyss Watcher cd2d396c9e tmp commit to resolve pstree case sensitive filename 2025-03-12 16:54:49 +01:00
Abyss Watcher c4054b4122 correct pstree json name 2025-03-12 16:51:14 +01:00
Abyss Watcher 489265e86c make modules test specific 2025-03-12 16:28:19 +01:00
Abyss Watcher d37f7b98f5 first windows testing enhancement iteration 2025-03-12 16:22:54 +01:00
Abyss Watcher a539047516 correctly order volshell args 2025-03-12 16:19:08 +01:00
Abyss Watcher ca20b6e979 enhance and extend testing helper functions 2025-03-12 16:10:12 +01:00
Abyss Watcher 2d5a6eeb8e add windows10 sample abstraction 2025-03-12 16:09:13 +01:00
Abyss Watcher d6362e010f add testing data constants 2025-03-12 16:08:52 +01:00
Abyss Watcher 7b0628d9c1 windows testing data 2025-03-12 15:59:07 +01:00
Abyss Watcher 8c1e9f0534 change args order to improve debugging ease 2025-03-05 15:12:02 +01:00
Abyss Watcher a162fceed4 migrate windows and linux tests to dedicated files 2025-03-04 16:54:11 +01:00
Abyss Watcher f7dfab57fd adjust helpers and add match_output_row 2025-03-04 16:46:03 +01:00
Abyss Watcher 367e0ebc0d add sample abstraction 2025-03-04 16:41:12 +01:00
ikelosandGitHub 51c19fbdf2 Merge branch 'feature/linux_ifconfig_plugin' into linux_ifconfig_plugin 2025-02-16 21:40:36 +00:00
Gustavo Moreira bf0271cd57 linux: kallsyms plugin: simplify argument by removing the "only-" prefix, which was also causing confusion. 2025-02-02 12:29:01 +11:00
Gustavo Moreira 5347926ab6 linux: Add pscallstack plugin testcase 2025-02-02 11:34:31 +11:00
Gustavo Moreira 80f6d0dad6 linux: Add kallsyms plugin testcase 2025-02-02 11:33:34 +11:00
ikelosandGitHub e66d6745ef Merge branch 'develop' into linux_ifconfig_plugin 2025-01-30 11:01:06 +00:00
Gustavo Moreira d8254b6373 linux: page_cache test case: Improve test 2025-01-16 21:39:37 +11:00
Gustavo Moreira 9944fcc61f linux: page_cache test case: Since the --dump no longer generate output, we test both modes, listing and dumping. 2025-01-16 21:15:22 +11:00
Gustavo Moreira ef977efe62 testcases: Improve volshell basic testcase calling ps() on each of them 2024-12-20 14:50:35 +11:00
Gustavo Moreira d546c983f3 testcases: Fix runvol* default list arguments 2024-12-20 14:33:36 +11:00
Gustavo Moreira c317a45eb5 testcases: Add missing operating system argument 2024-12-20 14:31:40 +11:00
Gustavo Moreira 658d40335a testcases: Add basic volshell testcases for each OS image 2024-12-20 13:06:14 +11:00
Gustavo Moreira 9c0dcad7b1 linux: page cache inodepages testcase: explicitly close the file to improve clarity for AI processing 2024-12-18 10:42:54 +11:00
Gustavo Moreira 69d291c644 linux: testcases: add 10 final test cases to achieve full plugin coverage 2024-12-18 10:16:59 +11:00
Gustavo Moreira 9c587b0378 linux: testcases: improve existent testcases code and checks 2024-12-18 10:12:32 +11:00
Arthur Deierlein f6c852c478 format with black 2024-12-17 22:55:39 +01:00
Arthur Deierlein a63ea662f4 apply unsafe fixes (ruff check --unsafe-fixes --fix) 2024-12-17 22:55:38 +01:00
Gustavo Moreira 3b0f0915c7 linux: page_cache: add testcase for page_cache.files plugin 2024-12-16 19:36:54 +11:00
ikelosandGitHub e4c552050c Merge pull request #1377 from gcmoreira/pytest_image_autoselection_improvement
Testing: Enable automatic OS image selection by matching test name and image filename prefixes
2024-12-01 11:06:46 +00:00
Gustavo Moreira 535ce3a22a testing: Enable automatic selection of the OS image based on the test and filename prefix, addressing an issue in the development environment.
For example, when using VSCode with pytest, test autodiscovery triggers pytest_generate_tests(), adding all images to each test case. This causes issues, as Linux tests end up being executed with Windows and Mac images, and vice versa.
2024-12-01 19:34:35 +11:00