Giter Site home page Giter Site logo

pangea-python's People

Contributors

caseysoftware avatar cj-f avatar cmoorepangea avatar dbenders avatar dependabot[bot] avatar developerenvy avatar doubletooth avatar dulanowiczpangea avatar ggallien13 avatar govind-salinas-pangea avatar jvm-pangea avatar kenany avatar mcombspangea avatar michaelcombs28 avatar nmader-pangea avatar pangea-andrest avatar pangea-anneyeh avatar r3dcrosse avatar renovate[bot] avatar ryanmeans avatar sourabhpangea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pangea-python's Issues

ValidationError: 1 validation error for URLReputationResult

Using: pangea-sdk 2.2.1

It appears the Python SDK may not be properly validating results for URLs that are not malicious.

from pangea.config import PangeaConfig
from pangea.services import UrlIntel
from pangea.tools import logger_set_pangea_config
config = PangeaConfig(domain='aws.us.pangea.cloud')
intel = UrlIntel("redacted", config=config, logger_name="intel")

## tftp://harry/vpn/ECTW/beta837-vpn-confg

params= dict(url="tftp://harry/vpn/ECTW/beta837-vpn-confg", provider='crowdstrike', verbose=True, raw=True)
>>> response = intel.reputation(**params)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/pangea/lib/python3.10/site-packages/pangea/services/intel.py", line 685, in reputation
    return self.request.post("v1/reputation", URLReputationResult, data=input.dict(exclude_none=True))
  File "/opt/pangea/lib/python3.10/site-packages/pangea/request.py", line 114, in post
    pangea_response = PangeaResponse(requests_response, result_class=result_class)
  File "/opt/pangea/lib/python3.10/site-packages/pangea/response.py", line 122, in __init__
    self.result_class(**self.raw_result)
  File "/opt/pangea/lib/python3.10/site-packages/pydantic/main.py", line 341, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for URLReputationResult
data -> category
  none is not an allowed value (type=type_error.none.not_allowed)

http://113.235.101.11

>>> params= dict(url="http://113.235.101.11", provider='crowdstrike', verbose=True, raw=True)
>>> response = intel.reputation(**params)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/pangea/lib/python3.10/site-packages/pangea/services/intel.py", line 685, in reputation
    return self.request.post("v1/reputation", URLReputationResult, data=input.dict(exclude_none=True))
  File "/opt/pangea/lib/python3.10/site-packages/pangea/request.py", line 114, in post
    pangea_response = PangeaResponse(requests_response, result_class=result_class)
  File "/opt/pangea/lib/python3.10/site-packages/pangea/response.py", line 122, in __init__
    self.result_class(**self.raw_result)
  File "/opt/pangea/lib/python3.10/site-packages/pydantic/main.py", line 341, in __init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for URLReputationResult
data -> category
  none is not an allowed value (type=type_error.none.not_allowed)

http://113.235.101.11:54384

>>> params= dict(url="http://113.235.101.11:54384", provider='crowdstrike', verbose=True, raw=True)
>>> response = intel.reputation(**params)
>>> response.summary
'URL was found: malicious with score 100'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.