Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug in multiple observable analysis #2047

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

drosetti
Copy link
Contributor

@drosetti drosetti commented Jan 3, 2024

Description

fixed bug in multiple observable analysis: all observable had the type of the first one

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist

  • I have read and understood the rules about how to Contribute to this project
  • The pull request is for the branch develop
  • A new plugin (analyzer, connector, visualizer, playbook, pivot or ingestor) was added or changed, in which case:
    • I strictly followed the documentation "How to create a Plugin"
    • Usage file was updated.
    • Advanced-Usage was updated (in case the plugin provides additional optional configuration).
    • If the plugin requires mocked testing, _monkeypatch() was used in its class to apply the necessary decorators.
    • I have dumped the configuration from Django Admin using the dumpplugin command and added it in the project as a data migration. ("How to share a plugin with the community")
    • If a File analyzer was added and it supports a mimetype which is not already supported, you added a sample of that type inside the archive test_files.zip and you added the default tests for that mimetype in test_classes.py.
    • If you created a new analyzer and it is free (does not require API keys), please add it in the FREE_TO_USE_ANALYZERS playbook by following this guide.
    • Check if it could make sense to add that analyzer/connector to other freely available playbooks.
    • I have provided the resulting raw JSON of a finished analysis and a screenshot of the results.
  • If external libraries/packages with restrictive licenses were used, they were added in the Legal Notice section.
  • Linters (Black, Flake, Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved (see tests folder). All the tests (new and old ones) gave 0 errors.
  • If changes were made to an existing model/serializer/view, the docs were updated and regenerated (check CONTRIBUTE.md).
  • If the GUI has been modified:
    • I have a provided a screenshot of the result in the PR.
    • I have created new frontend tests for the new component or updated existing ones.

Important Rules

  • If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
  • If your changes decrease the overall tests coverage (you will know after the Codecov CI job is done), you should add the required tests to fix the problem
  • Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review. After being reviewed and received a "change request", you should explicitly ask for a review again once you have made the requested changes.

@drosetti drosetti changed the title fixed bug in multiple observable analysis: all observable had the typ… fixed bug in multiple observable analysis Jan 3, 2024
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 1628 lines in your changes are missing coverage. Please review.

Comparison is base (aa8820f) 66.75% compared to head (e9c96d7) 75.62%.
Report is 1586 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2047      +/-   ##
===========================================
+ Coverage    66.75%   75.62%   +8.87%     
===========================================
  Files           95      482     +387     
  Lines         3706    14447   +10741     
  Branches       519     1498     +979     
===========================================
+ Hits          2474    10926    +8452     
- Misses         941     2926    +1985     
- Partials       291      595     +304     
Files Coverage Δ
api_app/analyzers_manager/admin.py 100.00% <100.00%> (ø)
api_app/analyzers_manager/apps.py 100.00% <100.00%> (ø)
api_app/analyzers_manager/constants.py 100.00% <100.00%> (ø)
api_app/analyzers_manager/exceptions.py 100.00% <100.00%> (ø)
...app/analyzers_manager/file_analyzers/boxjs_scan.py 100.00% <100.00%> (ø)
...pi_app/analyzers_manager/file_analyzers/onenote.py 100.00% <100.00%> (ø)
...pi_app/analyzers_manager/file_analyzers/peframe.py 82.35% <100.00%> (ø)
...i_app/analyzers_manager/file_analyzers/rtf_info.py 48.64% <100.00%> (ø)
...s_manager/file_analyzers/xlm_macro_deobfuscator.py 62.50% <100.00%> (ø)
api_app/analyzers_manager/filters.py 100.00% <100.00%> (ø)
... and 237 more

... and 291 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7be36d4...e9c96d7. Read the comment docs.

@drosetti drosetti merged commit e16d476 into develop Jan 4, 2024
14 checks passed
@drosetti drosetti deleted the fix-multi-observable-analysis branch January 4, 2024 09:14
mlodic added a commit that referenced this pull request Jan 12, 2024
* Using correct pipeline to manage visualizers (#2044)

* Using correct pipeline to manage visualizers

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Fix tests

Signed-off-by: 0ssigeno <s.berni@certego.net>

---------

Signed-off-by: 0ssigeno <s.berni@certego.net>

* tweaks to docs

* added exception catcher for Cymru analyzer

* fixed bug in info column in the plugin section

* fixed bug in multiple observable analysis (#2047)

* fixed bug in multiple observable analysis: all observable had the type of the first one

* linter

* restore IP regex to accept also IPv6

* removed env in the toolbar (#2050)

* removed env in the toolbar

* linter

* Dashboard improv: add button to filter for the user's org only (#2028)

* frontend : add switch for user's org

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* backend:add endpoint for the req

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* initial backend url

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* improve frontend logic

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* add user org filter

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* fix : try except block

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* remove redundant url endpoints

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* remove unnecessary commented code

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* add hide component logic

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* rename props

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* reduce redundant code via functions

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* convert get_org_members to static

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* remove logger changes

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* remove comments and rename variables

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* remove console statement

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* refactor get_org_members

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* fix:prettier

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

---------

Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>

* adjusted README

* Added check for path

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Fix corner case for multiple playbook

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Fix pointers

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Backend always decide the classification

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Job bi (#2052)

* job bi

Signed-off-by: 0ssigeno <s.berni@certego.net>

* More

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Job bi

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Migration

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Fix

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Fix

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Added playbook in the elastic template

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Fix

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Missin migrations

Signed-off-by: 0ssigeno <s.berni@certego.net>

---------

Signed-off-by: 0ssigeno <s.berni@certego.net>

* Bump pillow from 10.0.1 to 10.2.0 in /requirements (#2055)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump checkdmarc from 4.8.4 to 5.2.7 in /requirements (#2054)

Bumps [checkdmarc](https://github.com/domainaware/checkdmarc) from 4.8.4 to 5.2.7.
- [Changelog](https://github.com/domainaware/checkdmarc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/domainaware/checkdmarc/commits)

---
updated-dependencies:
- dependency-name: checkdmarc
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump quark-engine from 23.9.1 to 23.12.1 in /requirements (#2045)

Bumps [quark-engine](https://github.com/quark-engine/quark-engine) from 23.9.1 to 23.12.1.
- [Release notes](https://github.com/quark-engine/quark-engine/releases)
- [Commits](quark-engine/quark-engine@v23.9.1...v23.12.1)

---
updated-dependencies:
- dependency-name: quark-engine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump flake8 from 6.1.0 to 7.0.0 in /requirements (#2056)

Bumps [flake8](https://github.com/pycqa/flake8) from 6.1.0 to 7.0.0.
- [Commits](PyCQA/flake8@6.1.0...7.0.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Frontend - fixed runtime config bugs (#2064)

* fixed runtime config bugs

* restored old comment

---------

Co-authored-by: Daniele Rosetti <d.rosetti@certego.net>

* updated frontend dependencies

* Refactoring of start.py script. Closes #1899 and #1866  (#2060)

* Removed initialize.sh root execution

* Remove sudo command from installation

* Added python3-venv installation

* Dropped support for docker compose V1

* Added redirection to stderr

* Dropped support for docker compose V1

* Fixed download directory of script

* Changed shebang for better compatibility

* First not finished bash script

* Formatting fix

* Added parameter checks

* Added other parameters check

* Fixed wrongly used check

* Removed start() function

* Used exact string matching for parameters

* Added mandatory argument parsing

* Moved declaration of array inside of logical function

* Added main parameter case

* Added help function

* Added default version to help

* Completed help function

* Added argument parsing

* Added help option

* Fixed subtle error with bash logic values

* Most of the work done

* Working docker cmd

* Added project directory specification

* Removed unused function

* Improved error message

* Removed reduntand if condition

* Added checks for empty strings

* Removed pycharm warnings

* Fixed IntelOwl version

* Fixed some bugs

* Fixed wrong for index

* Fixed git checkout

* Removed wrongly placed comment

* Removed python pre-requirements depencency

* Added execution of initialize.sh from start

* Entering venv

* Removed unused echo

* Added check for docker group

* Updated docs to use new startup script

* Fixed typo in doc

* Changed generic code blocks to bash

* Add curl dependency

* Add curl dependency

* Re added pre-requirements for compatibility

* Removed old occurrences of start.py

* Added test docker file for integrations

* Added manual usage to doc

* Removed python3 and venv dependency

* Updated major release informations

* Removed python and venv dependency for start

* Removed python and venv dependency for start from docs

* Made code-review-doctor happy

* Improved installation doc

* Added absolute path for application_restart

* Updated docs

* added deprecation notice

---------

Co-authored-by: Matteo Lodi <30625432+mlodic@users.noreply.github.com>

* Fixed creating a playbook with an existing tag (#2057)

* changed playbook serializer

* deepsource

---------

Co-authored-by: Matteo Lodi <30625432+mlodic@users.noreply.github.com>

* bump and changelog

---------

Signed-off-by: 0ssigeno <s.berni@certego.net>
Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Simone Berni <simone.berni2@studio.unibo.it>
Co-authored-by: Daniele Rosetti <d.rosetti@certego.net>
Co-authored-by: Daniele Rosetti <55402684+drosetti@users.noreply.github.com>
Co-authored-by: Shivam Purohit <shivampurohit900@gmail.com>
Co-authored-by: 0ssigeno <s.berni@certego.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martina Carella <m.carella@certego.net>
Co-authored-by: fgibertoni <152909479+fgibertoni@users.noreply.github.com>
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.

1 participant