Giter Club home page Giter Club logo

Comments (5)

isaisabel avatar isaisabel commented on June 2, 2024 1

Hi @getkub,

This is an issue introduced by a recent update to the taxii2client library. Essentially they changed their API such that the default TAXII requests will try to fetch STIX 2.1 content using TAXII 2.1 from the TAXII server. Because our TAXII server uses the TAXII 2.0 spec (and stores STIX 2.0 content) this results in the 406 not acceptable error you're getting.

The correct resolution is to update your import:

from taxii2client.v20 import Collection

This issue is rather tricky for us because it depends on which version of the taxii2client repo users have installed -- only users with new installs get the error, and users who perform the above fix with the older taxii2client version may get errors.

See also #19.

from attack-scripts.

getkub avatar getkub commented on June 2, 2024

Hi @getkub,

This is an issue introduced by a recent update to the taxii2client library. Essentially they changed their API such that the default TAXII requests will try to fetch STIX 2.1 content using TAXII 2.1 from the TAXII server. Because our TAXII server uses the TAXII 2.0 spec (and stores STIX 2.0 content) this results in the 406 not acceptable error you're getting.

The correct resolution is to update your import:

from taxii2client.v20 import Collection

This issue is rather tricky for us because it depends on which version of the taxii2client repo users have installed -- only users with new installs get the error, and users who perform the above fix with the older taxii2client version may get errors.

See also #19.

Yeah, I tried that. the above logic of
from taxii2client.v20 import Collection

works ok for techniques_data_sources_vis.py, But NOT for https://github.com/mitre-attack/attack-scripts/blob/master/scripts/technique_mappings_to_csv.py.

But thanks anyway, will downgrade and see

from attack-scripts.

isaisabel avatar isaisabel commented on June 2, 2024

Reopening so that we can investigate the fix for technique_mappings_to_csv.py.

from attack-scripts.

isaisabel avatar isaisabel commented on June 2, 2024

Hi @getkub,

I think the way the taxii2client import is used in technique_mappings_to_csv.py is slightly different and requires more tweaking. In the case of that file, you can do one of two things:

    • Change line 6 to from taxii2client.v20 import Collection
    • Change line 18 to collection = Collection(collection_url)
  1. Change line 18 to collection = taxii2client.v20.Collection(collection_url) without updating the import.

Let me know if that works for you.

from attack-scripts.

isaisabel avatar isaisabel commented on June 2, 2024

This has been resolved in the v1.5.2 release.

from attack-scripts.

Related Issues (20)

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.