Skip to content

Adds a CI job for testing code changes against known samples on the m…#38

Merged
jeFF0Falltrades merged 3 commits intomasterfrom
17-add-a-testing-pipeline-for-contributors
Jan 12, 2026
Merged

Adds a CI job for testing code changes against known samples on the m…#38
jeFF0Falltrades merged 3 commits intomasterfrom
17-add-a-testing-pipeline-for-contributors

Conversation

@jeFF0Falltrades
Copy link
Owner

…ain repo

Going to test this out as an initial stab at having a test pipeline at the very least for the main repository.

It includes a test suite and an encrypted ZIP of known samples that I would rather not propagate via the repo plainly, so the CI job is set up to decrypt and test against these only for PRs that are being merged or sourced from the main repo itself (though the hashes are plain to see if other researchers wish to download and test against them).

We'll adjust this as needed.

@jeFF0Falltrades jeFF0Falltrades linked an issue Jan 12, 2026 that may be closed by this pull request
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jeFF0Falltrades, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes a foundational testing pipeline for the main repository by integrating a new CI job. The primary goal is to ensure the rat-king-parser accurately extracts configuration details from known malware samples. This is achieved through a pytest-based test suite that processes encrypted samples (only accessible within the main repo's CI environment) and compares the parser's output against expected results, thereby enhancing the reliability and correctness of the parsing logic.

Highlights

  • New CI Job for Malware Sample Testing: A new Continuous Integration (CI) job has been introduced to test the parser against a collection of known malware samples, ensuring the accuracy and reliability of configuration extraction.
  • Dedicated Pytest Test Suite: A dedicated test suite, test_known_samples.py, has been added, utilizing pytest to validate the parser's output against pre-defined expected JSON configurations for these samples.
  • Version Increment: The project version has been incremented from 4.2.1 to 4.2.2 in src/rat_king_parser/_version.py.
  • Updated Build and Ignore Configurations: Configuration files (.gitignore, pyproject.toml) have been updated to support the new testing infrastructure, including ignoring sample directories and adding pytest as a development dependency.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a CI job to test code changes against a suite of known samples, which is a great step towards ensuring the parser's reliability. The changes include adding test dependencies, version bumping, and creating the test suite itself along with expected outputs. The test implementation is robust, with good use of pytest features for parameterization and conditional skipping. I have one suggestion to make the code for finding sample files more concise and Pythonic.

jeFF0Falltrades and others added 2 commits January 11, 2026 23:13
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@jeFF0Falltrades jeFF0Falltrades merged commit 4b7fb7a into master Jan 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a testing pipeline for contributors

1 participant