Giter VIP home page Giter VIP logo

thoth-station / cli-examples Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 9.0 120 KB

Examples of Thoth's recommendations using Thamos CLI

Home Page: https://redhat-scholars.github.io/managing-vulnerabilities-with-thoth/managing-vulnerabilities-with-thoth/index.html

License: GNU General Public License v3.0

Python 100.00%
ai-stacks artificial-intelligence hacktoberfest kubernetes openshift tensorflow thoth

cli-examples's People

Contributors

codificat avatar fridex avatar goern avatar mayacostantini avatar sesheta avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cli-examples's Issues

Failed to update dependencies to their latest version for ubi8 environment

Automatic dependency update failed for the current master with SHA 1a5ff1f.

The automatic dependency management cannot continue. Please fix errors reported bellow.

Command
  $ pipenv update --dev
Standard output
Running $ pipenv lock then $ pipenv sync.
Installing dependencies from Pipfile.lock (4cb20a)...
Installing initially failed dependencies...

Standard error
Creating a virtualenv for this project...
Pipfile: /tmp/clone-dir/Pipfile
Using /usr/bin/python3.6m (3.6.8) to create virtualenv...
created virtual environment CPython3.6.8.final.0-64 in 1196ms
  creator CPython3Posix(dest=/tmp/clone-dir/.venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/tmp/tmpg7ektm8u)
    added seed packages: pip==21.3.1, setuptools==58.3.0, wheel==0.37.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator


Successfully created virtual environment!
�[KVirtualenv location: /tmp/clone-dir/.venv
Locking [dev-packages] dependencies...
Locking [packages] dependencies...

Building requirements...
�[K
Resolving dependencies...
�[K
Success!
�[KUpdated Pipfile.lock (4cb20a)!
An error occurred while installing tensorflow==2.6.2 --hash=sha256:caffa6d919b428901e224f778206d5bac4b553dadc1301409781af971b06e000 --hash=sha256:16dc1ee49dd8b761577f8abd914a2836647de393b17fe140885f72acd8483e96 --hash=sha256:22b88b00d74774ee1ffd22e504b37ae9af512aff804d26652d2497687830525f --hash=sha256:6da1ca578c061d6072829777d121a0b755d3d50770b4ea3879cdb5eba28dee03 --hash=sha256:9c85ba08cd08dbf3ba09720e03672da3ccdf969377be85d03bc24b5fe3ca8c21 --hash=sha256:e12e70b768e2f1901e69367fae94ac78b0f524019ea439ab849dd2afadcd6450 --hash=sha256:ec08a181a587504ccde13960d47a687e8155c4d1f24750801db9da41d95e7722 --hash=sha256:50e216f3c8512d27d41d24b8990faa2d8a408196cf53342703c26ff5e2cf0ab0 --hash=sha256:902b233337538e89752f019b3c16b23dff4915f6d3666c35ec029ab4641e9f1c --hash=sha256:423e814557ddd1562a01a78925362bb25b47bafd4f840f22dae34033945beffd --hash=sha256:b57cebd87d31de8ebd200ad5957d7b54145eafb650f7d8aaf21e89718bade50a --hash=sha256:2c9c4506cc8bb5cdd25a9b5046fbdc91dd29ba931f55c98a126f33a9c86668f1! Will try again.
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/cli/command.py", line 594, in update
[InstallError]:       do_sync(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 2884, in do_sync
[InstallError]:       do_init(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 1304, in do_init
[InstallError]:       do_install_dependencies(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 899, in do_install_dependencies
[InstallError]:       batch_install(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: Looking in indexes: https://tensorflow.pypi.thoth-station.ninja/index/manylinux2010/AVX2/simple, https://pypi.org/simple, https://pypi.org/simple
[pipenv.exceptions.InstallError]: Collecting tensorflow==2.6.2
ERROR: Couldn't install package: tensorflow
 Package installation failed...

Environment details

Kebechet version: 1.6.7
Python version: 3.8.8
Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.2.5
pipenv version: pipenv, version 2020.11.15


Dependency graph
Unable to obtain dependency graph:

An error occurred while installing tensorflow! Will try again.
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/cli/command.py", line 233, in install
[InstallError]:       retcode = do_install(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 2052, in do_install
[InstallError]:       do_init(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 1304, in do_init
[InstallError]:       do_install_dependencies(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 899, in do_install_dependencies
[InstallError]:       batch_install(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: Looking in indexes: https://tensorflow.pypi.thoth-station.ninja/index/manylinux2010/AVX2/simple, https://pypi.org/simple, https://pypi.org/simple
[pipenv.exceptions.InstallError]: Collecting tensorflow
ERROR: Couldn't install package: tensorflow
 Package installation failed...

Notes

For more information, see Pipfile and Pipfile.lock.

Once this issue is resolved, the issue will be automatically closed by bot.

/label thoth/potential-flake
/kind bug
/priority critical-urgent

Failed to update dependencies to their latest version

Automatic dependency update failed for the current master with SHA 1a5ff1f.

The automatic dependency management cannot continue. Please fix errors reported bellow.

Command
  $ pipenv update --dev
Standard output
Running $ pipenv lock then $ pipenv sync.
Installing dependencies from Pipfile.lock (4cb20a)...
Installing initially failed dependencies...

Standard error
Creating a virtualenv for this project...
Pipfile: /tmp/tmpvj3epo4q/Pipfile
Using /usr/bin/python3.6m (3.6.8) to create virtualenv...
created virtual environment CPython3.6.8.final.0-64 in 644ms
  creator CPython3Posix(dest=/tmp/tmpvj3epo4q/.venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/tmp/tmpnfnm9a7x)
    added seed packages: pip==21.2.4, setuptools==58.1.0, wheel==0.37.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator


Successfully created virtual environment!
�[KVirtualenv location: /tmp/tmpvj3epo4q/.venv
Locking [dev-packages] dependencies...
Locking [packages] dependencies...

Building requirements...
�[K
Resolving dependencies...
�[K
Success!
�[KUpdated Pipfile.lock (4cb20a)!
An error occurred while installing tensorflow==2.6.2 --hash=sha256:902b233337538e89752f019b3c16b23dff4915f6d3666c35ec029ab4641e9f1c --hash=sha256:caffa6d919b428901e224f778206d5bac4b553dadc1301409781af971b06e000 --hash=sha256:16dc1ee49dd8b761577f8abd914a2836647de393b17fe140885f72acd8483e96 --hash=sha256:50e216f3c8512d27d41d24b8990faa2d8a408196cf53342703c26ff5e2cf0ab0 --hash=sha256:ec08a181a587504ccde13960d47a687e8155c4d1f24750801db9da41d95e7722 --hash=sha256:6da1ca578c061d6072829777d121a0b755d3d50770b4ea3879cdb5eba28dee03 --hash=sha256:423e814557ddd1562a01a78925362bb25b47bafd4f840f22dae34033945beffd --hash=sha256:9c85ba08cd08dbf3ba09720e03672da3ccdf969377be85d03bc24b5fe3ca8c21! Will try again.
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/cli/command.py", line 594, in update
[InstallError]:       do_sync(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 2884, in do_sync
[InstallError]:       do_init(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 1304, in do_init
[InstallError]:       do_install_dependencies(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 899, in do_install_dependencies
[InstallError]:       batch_install(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: Looking in indexes: https://tensorflow.pypi.thoth-station.ninja/index/manylinux2010/AVX2/simple, https://pypi.org/simple, https://pypi.org/simple
[pipenv.exceptions.InstallError]: Collecting tensorflow==2.6.2
ERROR: Couldn't install package: tensorflow
 Package installation failed...

Environment details

Kebechet version: 1.5.5
Python version: 3.8.6
Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.2.5
pipenv version: pipenv, version 2020.11.15


Dependency graph
Unable to obtain dependency graph:

An error occurred while installing tensorflow! Will try again.
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/cli/command.py", line 233, in install
[InstallError]:       retcode = do_install(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 2052, in do_install
[InstallError]:       do_init(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 1304, in do_init
[InstallError]:       do_install_dependencies(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 899, in do_install_dependencies
[InstallError]:       batch_install(
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]:   File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.8/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: Looking in indexes: https://tensorflow.pypi.thoth-station.ninja/index/manylinux2010/AVX2/simple, https://pypi.org/simple, https://pypi.org/simple
[pipenv.exceptions.InstallError]: Collecting tensorflow
ERROR: Couldn't install package: tensorflow
 Package installation failed...

Notes

For more information, see Pipfile and Pipfile.lock.

Once this issue is resolved, the issue will be automatically closed by bot.

/label thoth/potential-flake
/kind bug
/priority critical-urgent

Create an example app to demonstrate `thamos` resolution process

Is your feature request related to a problem? Please describe.
As a Thoth user, I would like an example of how to use thamos to discover vulnerabilities in my Python dependencies and play with a simple app that uses the inspected packages.

Describe the solution you'd like

  • Implement a "game of life" simple app as an example
  • Find dependency versions containing known vulnerabilities and specify them as requirements

Describe alternatives you've considered
Use the tensorflow example app already existing

Failed to update dependencies to their latest version

Automatic dependency update failed for the current master with SHA bfd4f0e.

The automatic dependency management cannot continue. Please fix errors reported bellow.

Command
  $ pipenv lock
Standard output

Standard error
Locking [dev-packages] dependencies...
Locking [packages] dependencies...

Building requirements...
�[K
Resolving dependencies...
�[K
FAIL
�[KTraceback (most recent call last):
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/resolver.py", line 764, in <module>
    main()
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/resolver.py", line 760, in main
    dev=parsed.dev)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/resolver.py", line 741, in _main
    resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/resolver.py", line 714, in resolve_packages
    results = clean_results(results, resolver, project, dev)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/resolver.py", line 590, in clean_results
    reverse_deps = project.environment.reverse_dependencies()
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/project.py", line 376, in environment
    self._environment = self.get_environment(allow_global=allow_global)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/project.py", line 366, in get_environment
    environment.extend_dists(pipenv_dist)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/environment.py", line 127, in extend_dists
    extras = self.resolve_dist(dist, self.base_working_set)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/environment.py", line 122, in resolve_dist
    deps |= cls.resolve_dist(dist, working_set)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/environment.py", line 121, in resolve_dist
    dist = working_set.find(req)
  File "/tmp/tmpw7oxs04d/.venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 627, in find
    raise VersionConflict(dist, req)
pkg_resources.VersionConflict: (importlib-metadata 3.0.0 (/tmp/tmpw7oxs04d/.venv/lib/python3.6/site-packages), Requirement.parse('importlib-metadata<3,>=0.12; python_version < "3.8"'))


Traceback (most recent call last):
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/utils.py", line 1131, in create_spinner
    yield sp
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/utils.py", line 1338, in venv_resolve_deps
    c = resolve(cmd, sp)
  File "/home/user/.local/share/virtualenvs/user-5PivF_Od/lib/python3.6/site-packages/pipenv/utils.py", line 1176, in resolve
    sys.exit(c.return_code)
SystemExit: 1

�[K
Environment details

Kebechet version: 1.1.2
Python version: 3.6.8
Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-redhat-8.3-Ootpa
pipenv version: pipenv, version 2020.11.15


Dependency graph
tensorflow==2.3.1
  - absl-py [required: >=0.7.0, installed: 0.11.0]
    - six [required: Any, installed: 1.15.0]
  - astunparse [required: ==1.6.3, installed: 1.6.3]
    - six [required: >=1.6.1,<2.0, installed: 1.15.0]
    - wheel [required: >=0.23.0,<1.0, installed: 0.35.1]
  - gast [required: ==0.3.3, installed: 0.3.3]
  - google-pasta [required: >=0.1.8, installed: 0.2.0]
    - six [required: Any, installed: 1.15.0]
  - grpcio [required: >=1.8.6, installed: 1.33.2]
    - six [required: >=1.5.2, installed: 1.15.0]
  - h5py [required: >=2.10.0,<2.11.0, installed: 2.10.0]
    - numpy [required: >=1.7, installed: 1.18.5]
    - six [required: Any, installed: 1.15.0]
  - keras-preprocessing [required: >=1.1.1,<1.2, installed: 1.1.2]
    - numpy [required: >=1.9.1, installed: 1.18.5]
    - six [required: >=1.9.0, installed: 1.15.0]
  - numpy [required: >=1.16.0,<1.19.0, installed: 1.18.5]
  - opt-einsum [required: >=2.3.2, installed: 3.3.0]
    - numpy [required: >=1.7, installed: 1.18.5]
  - protobuf [required: >=3.9.2, installed: 3.14.0]
    - six [required: >=1.9, installed: 1.15.0]
  - six [required: >=1.12.0, installed: 1.15.0]
  - tensorboard [required: >=2.3.0,<3, installed: 2.4.0]
    - absl-py [required: >=0.4, installed: 0.11.0]
      - six [required: Any, installed: 1.15.0]
    - google-auth [required: >=1.6.3,<2, installed: 1.23.0]
      - cachetools [required: >=2.0.0,<5.0, installed: 4.1.1]
      - pyasn1-modules [required: >=0.2.1, installed: 0.2.8]
        - pyasn1 [required: >=0.4.6,<0.5.0, installed: 0.4.8]
      - rsa [required: >=3.1.4,<5, installed: 4.6]
        - pyasn1 [required: >=0.1.3, installed: 0.4.8]
      - setuptools [required: >=40.3.0, installed: 50.3.2]
      - six [required: >=1.9.0, installed: 1.15.0]
    - google-auth-oauthlib [required: >=0.4.1,<0.5, installed: 0.4.2]
      - google-auth [required: Any, installed: 1.23.0]
        - cachetools [required: >=2.0.0,<5.0, installed: 4.1.1]
        - pyasn1-modules [required: >=0.2.1, installed: 0.2.8]
          - pyasn1 [required: >=0.4.6,<0.5.0, installed: 0.4.8]
        - rsa [required: >=3.1.4,<5, installed: 4.6]
          - pyasn1 [required: >=0.1.3, installed: 0.4.8]
        - setuptools [required: >=40.3.0, installed: 50.3.2]
        - six [required: >=1.9.0, installed: 1.15.0]
      - requests-oauthlib [required: >=0.7.0, installed: 1.3.0]
        - oauthlib [required: >=3.0.0, installed: 3.1.0]
        - requests [required: >=2.0.0, installed: 2.25.0]
          - certifi [required: >=2017.4.17, installed: 2020.11.8]
          - chardet [required: >=3.0.2,<4, installed: 3.0.4]
          - idna [required: >=2.5,<3, installed: 2.10]
          - urllib3 [required: >=1.21.1,<1.27, installed: 1.26.2]
    - grpcio [required: >=1.24.3, installed: 1.33.2]
      - six [required: >=1.5.2, installed: 1.15.0]
    - markdown [required: >=2.6.8, installed: 3.3.3]
      - importlib-metadata [required: Any, installed: 3.0.0]
        - zipp [required: >=0.5, installed: 3.4.0]
    - numpy [required: >=1.12.0, installed: 1.18.5]
    - protobuf [required: >=3.6.0, installed: 3.14.0]
      - six [required: >=1.9, installed: 1.15.0]
    - requests [required: >=2.21.0,<3, installed: 2.25.0]
      - certifi [required: >=2017.4.17, installed: 2020.11.8]
      - chardet [required: >=3.0.2,<4, installed: 3.0.4]
      - idna [required: >=2.5,<3, installed: 2.10]
      - urllib3 [required: >=1.21.1,<1.27, installed: 1.26.2]
    - setuptools [required: >=41.0.0, installed: 50.3.2]
    - six [required: >=1.10.0, installed: 1.15.0]
    - tensorboard-plugin-wit [required: >=1.6.0, installed: 1.7.0]
    - werkzeug [required: >=0.11.15, installed: 1.0.1]
    - wheel [required: >=0.26, installed: 0.35.1]
  - tensorflow-estimator [required: >=2.3.0,<2.4.0, installed: 2.3.0]
  - termcolor [required: >=1.1.0, installed: 1.1.0]
  - wheel [required: >=0.26, installed: 0.35.1]
  - wrapt [required: >=1.11.1, installed: 1.12.1]

Notes

For more information, see Pipfile and Pipfile.lock.

Once this issue is resolved, the issue will be automatically closed by bot.

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.