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

feat(sca): creating alias mapping for javascript #5567

Merged
merged 22 commits into from
Sep 20, 2023
Merged

Conversation

itai1357
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

creating alias mapping for javascript

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Contributor

@NoaAzoulay NoaAzoulay left a comment

Choose a reason for hiding this comment

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

💯

from typing import List, Dict

# {<package_name>: {"packageAliases": [<alias_1> ,..... , <alias_n>]}}
FileParserOutput = Dict[str, Dict[str, List[str]]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's create stricter types for the entire mapping object (can leverage pydantic for that)
Since we will pass this object to sast-core we need to have a clear view of the "contract"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed. let's talk !

@itai1357 itai1357 merged commit 10797d9 into main Sep 20, 2023
26 of 27 checks passed
@itai1357 itai1357 deleted the itai_sast_mapping branch September 20, 2023 09:32
lif2 pushed a commit to lif2/checkov that referenced this pull request Sep 20, 2023
* add javascript_alias_mapping_strategy

* test, failure handling

* fix flake8

* rwemoving redudnat prints

* fix mypy

* creating the utils file

* using the new format

* using the new format

* fix tests

* fix tests

* fix tests

* fix tests

* remove file

* using pydantic

* fix tests

* fix tests

* fix tests

* fix tests

* add

---------

Co-authored-by: ipeleg <[email protected]>
itai1357 pushed a commit that referenced this pull request Sep 20, 2023
itai1357 added a commit that referenced this pull request Sep 20, 2023
Revert "feat(sca): creating alias mapping for javascript (#5567)"

This reverts commit 10797d9.

Co-authored-by: ipeleg <[email protected]>
lif2 pushed a commit to lif2/checkov that referenced this pull request Sep 20, 2023
…#5581)

Revert "feat(sca): creating alias mapping for javascript (bridgecrewio#5567)"

This reverts commit 10797d9.

Co-authored-by: ipeleg <[email protected]>
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.

3 participants