-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update serializers.py #206
Conversation
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Reviewer's Guide by SourceryThis PR removes the "plugin_config" field from the "AnalyzerConfigSerializer" and adds a "to_representation" method to include the "parameters" field in the serialized output. It also removes the create and update methods from the serializer. Sequence diagram showing updated serialization flowsequenceDiagram
participant C as Client
participant S as AnalyzerConfigSerializer
participant M as Model
C->>S: Request serialized data
S->>M: Get instance data
M-->>S: Return instance data
S->>M: Get parameters
M-->>S: Return parameters
Note over S: Serialize parameters
S-->>C: Return serialized data with parameters
Class diagram showing changes to AnalyzerConfigSerializerclassDiagram
class PythonConfigSerializer {
+Meta
}
class AnalyzerConfigSerializer {
-plugin_config: ListField [Removed]
+python_module: SlugRelatedField
+Meta
-create(validated_data) [Removed]
-update(instance, validated_data) [Removed]
+to_representation(instance)
}
class AnalyzerConfigSerializerForMigration
PythonConfigSerializer <|-- AnalyzerConfigSerializer
PythonConfigSerializerForMigration --|> PythonConfigSerializer
note for AnalyzerConfigSerializer "Removed plugin_config handling
Added parameters serialization"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
⛔ Snyk checks have failed. 11 issues have been found so far.
⛔ security/snyk check is complete. 11 issues have been found. (View Details) |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Here's the code health analysis summary for commits Analysis Summary
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @gitworkflows - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please provide a detailed description of why this change is needed and what problem it solves. The current PR title and description are too vague.
- This appears to be a breaking change since it removes plugin configuration functionality. Please explain where this functionality is being moved to and update the 'Type of change' section accordingly.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
CI Failure Feedback 🧐(Checks updated until commit 6191f4b)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
See more information about the |
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com>
* not-ready for CI/CD * fix: ci * fix: funding * Update README.md Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update TLPSelectInput.jsx Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update notifications.jsx Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update TokenPage.jsx Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update GuideWrapper.jsx Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update TokenAccess.jsx Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Create test_nvd_cve.py Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Create __init__.py Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Create 0130_analyzer_config_nvd_cve.py Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Create nvd_cve.py Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update project-requirements.txt Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update project-requirements.txt Signed-off-by: NxPKG <iconmamundentist@gmail.com> * update * update * Fix retry (#181) Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update RecentScans.jsx (#182) Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose-tests.yml (#183) * Update compose-tests.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose-tests.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose-tests.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose-tests.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update compose.yml Signed-off-by: NxPKG <iconmamundentist@gmail.com> --------- Signed-off-by: NxPKG <iconmamundentist@gmail.com> * fixed dashboard backend unittest * black format * fix isort * prettier:write fix * Update test_auth.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update project-requirements.txt Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update serializers.py (#206) * Update serializers.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update urls.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update views.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update urls.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update views.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update urls.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update views.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update serializers.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update urls.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update views.py Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Refactor Plugin Config * Refactor Plugin Config --------- Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update package.json Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Update package-lock.json Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> * Bump eslint-plugin-react from 7.37.1 to 7.37.3 in /frontend (#201) Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.37.1 to 7.37.3. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.37.3/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.37.1...v7.37.3) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Frontend - Search page (elastic gui) (#209) * Frontend - Search page (elastic gui) * Frontend - Search page (elastic gui) * Frontend - Search page (elastic gui) * Update AppHeader.jsx Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Update test_views.py Signed-off-by: NxPKG <iconmamundentist@gmail.com> --------- Signed-off-by: NxPKG <iconmamundentist@gmail.com> * Bump github/codeql-action from 2.22.11 to 3.28.8 (#224) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.11 to 3.28.8. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v2.22.11...v3.28.8) --- updated-dependencies: - dependency-name: github/codeql-action 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> * update * update * update * update * update --------- Signed-off-by: NxPKG <iconmamundentist@gmail.com> Signed-off-by: gitworkflows <118260833+gitworkflows@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: NxPKG <iconmamundentist@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: KhulnaSoft bot <technosulaiman@gmail.com>
User description
(Please add to the PR name the issue/s that this PR would close if merged by using a Github keyword. Example:
<feature name>. Closes #999
. If your PR is made by a single commit, please add that clause in the commit too. This is all required to automate the closure of related issues.)Description
Please include a summary of the change and link to the related issue.
Type of change
Please delete options that are not relevant.
Checklist
develop
dumpplugin
command and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zip
and you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERS
playbook by following this guide.url
that contains this information. This is required for Health Checks._monkeypatch()
was used in its class to apply the necessary decorators.MockUpResponse
of the_monkeypatch()
method. This serves us to provide a valid sample for testing.Black
,Flake
,Isort
) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.tests
folder). All the tests (new and old ones) gave 0 errors.DeepSource
,Django Doctors
or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules
PR Type
Enhancement
Description
Changes walkthrough 📝
serializers.py
Refactor analyzer config serialization to use parameters
api_app/analyzers_manager/serializers.py
AnalyzerConfigSerializer
output