Giter VIP home page Giter VIP logo

mozilla-depends's Introduction

mozilla-depends

Requirements

  • Node v9 or later (e.g. nvm install v9 && nvm use v9)
  • npm available in $PATH
  • pipenv with python 3.7
  • graphviz headers (e.g. on ubuntu or debian sudo apt install libgraphviz-dev)

Installation

  • hg clone --uncompressed https://hg.mozilla.org/mozilla-unified
  • git clone [email protected]:mozilla/mozilla-depends.git
  • cd mozilla-depends/utils/
  • pipenv install -e .[dev]
  • npm install .

Usage

mozdep must be run from the utils directory for finding retire binary. It tries to be smart about finding the local mozilla-central tree. If it is not smart enough, pass it --tree.

  • pipenv run pytest -v
  • pipenv run mozdep --tree ../../mozilla-unified/ --debug detect -c /tmp/out.csv

mozilla-depends's People

Contributors

cr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

g-k

mozilla-depends's Issues

Add open source software license

This Mozilla repository has been identified as lacking a license. Consistent with Mozilla's Licensing Policy an open source license should be applied to the code in this repository.

Please add an appropriate LICENSE.md file to the root directory of the project. In general, Mozilla's licensing policies are as follows:

  • Client-side products created by Mozilla employees or contributors should use the Mozilla Public License, Version 2.0 (MPL).

  • Server-side products or utilities that support Mozilla products may use either the MPL or the Apache License 2.0 (Apache 2.0).

In special cases, another license might be appropriate. If the repository is a fork of another repository it must apply the license of the original. Similarly, another license might be appropriate to match that of a broader project (for example Rust crates that Firefox depends on are published under an Apache 2.0 / MIT dual license, as that is the dual license used by the Rust programming language and projects).

Please ensure that any license added to the LICENSE.md file matches other licensing information in the repository (for example, it should match any license indicated in a setup.py or package.json file).

Mozilla staff can access more information in our Software Licensing Runbook – search for “Licensing Runbook” in Confluence to find it.

If you have any questions you can contact Daniel Nazer who can be reached at dnazer on Mozilla email or Slack.

OPENLIC-2023-01

error consuming [email protected] output

This might be an artifact of my local dev env, but I'm seeing the following error:

...
2019-07-18 20:38:50 INFO MainThread mozdep.detectors.retirejs RetireDependency adding `third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/jquery/dist
/jquery.min.js`
2019-07-18 20:38:50 DEBUG MainThread mozdep.detectors.retirejs Processing file /home/gguthe/mozilla-unified/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/flight/nod
e_modules/jquery/dist/jquery.min.js
2019-07-18 20:38:50 DEBUG MainThread mozdep.detectors.retirejs Updating existing vulnerability node for CVE-2015-9251
2019-07-18 20:38:50 DEBUG MainThread mozdep.detectors.retirejs Updating existing vulnerability node for CVE-2015-9251
2019-07-18 20:38:50 DEBUG MainThread mozdep.detectors.retirejs Updating existing vulnerability node for CVE-2019-11358
Traceback (most recent call last):
  File "/home/gguthe/mozilla-unified/mozilla-depends/venv/bin/mozdep", line 11, in <module>
    load_entry_point('mozdep', 'console_scripts', 'mozdep')()
  File "/home/gguthe/mozilla-unified/mozilla-depends/utils/mozdep/main.py", line 107, in main
    result = command.run(args, tmp_dir)
  File "/home/gguthe/mozilla-unified/mozilla-depends/utils/mozdep/command/__init__.py", line 44, in run
    result = current_command.run()
  File "/home/gguthe/mozilla-unified/mozilla-depends/utils/mozdep/command/detect.py", line 54, in run
    run_all(repo_dir, g, choice=self.args.detector)
  File "/home/gguthe/mozilla-unified/mozilla-depends/utils/mozdep/detectors/__init__.py", line 78, in run_all
    ret = run(detector.name(), tree, graph)
  File "/home/gguthe/mozilla-unified/mozilla-depends/utils/mozdep/detectors/__init__.py", line 53, in run
    current_detector.run()
  File "/home/gguthe/mozilla-unified/mozilla-depends/utils/mozdep/detectors/retirejs.py", line 88, in run
    if len(f["results"]) == 0:
TypeError: list indices must be integers or slices, not str

This is against moz-unified @ 540474:a50c36fad95a. For some reason retire is returning an empty list as the last item with JSON output:

$ # from the unified root
$ mozilla-depends/utils/node_modules/.bin/retire --verbose --outputformat json third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/jquery/dist/jquery.min.js
..."file":"/home/gguthe/mozilla-unified/third_party/webkit/PerformanceTests/Speedometer/
resources/todomvc/dependency-examples/flight/flight/node_modules/flight/lib/utils.js","results":[]},{"file":"/home/gguthe/mozilla-unified/third_party/webkit/P
erformanceTests/Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/director/build/director.js","results":[]},{"file":"/home/gguth
e/mozilla-unified/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/director/build/director.
min.js","results":[]},{"file":"/home/gguthe/mozilla-unified/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/labs/architecture-examples/react
/bower_components/director/build/ender.js","results":[]},{"file":"/home/gguthe/mozilla-unified/testing/talos/talos/tests/devtools/addon/content/pages/custom/d
ebugger/static/js/main.js","results":[]},{"file":"/home/gguthe/mozilla-unified/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/b
arlesque/1.8.15/desktop/3/script/barlesque.js","results":[]},[]]

I have a simple patch I'll submit, but I thought I'd raise the issue for documentation purposes.

Implement upstream version detection

  • Python (via pip-check)
  • Rust (via cargo audit)
  • C++ (ported from ThirdPartlyLibraryAlerts)
  • generically for GitHub projects
  • JS (via retire.js?)
  • Node (via npm)

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.