swh.vulns 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. swh_vulns-0.2.1/.copier-answers.yml +12 -0
  2. swh_vulns-0.2.1/.copyright-updater.yaml +1 -0
  3. swh_vulns-0.2.1/.gitignore +21 -0
  4. swh_vulns-0.2.1/.pre-commit-config.yaml +67 -0
  5. swh_vulns-0.2.1/AUTHORS +3 -0
  6. swh_vulns-0.2.1/CODE_OF_CONDUCT.md +78 -0
  7. swh_vulns-0.2.1/CONTRIBUTORS +0 -0
  8. swh_vulns-0.2.1/Cargo.lock +6755 -0
  9. swh_vulns-0.2.1/Cargo.toml +16 -0
  10. swh_vulns-0.2.1/LICENSE +674 -0
  11. swh_vulns-0.2.1/Makefile +5 -0
  12. swh_vulns-0.2.1/Makefile.local +2 -0
  13. swh_vulns-0.2.1/PKG-INFO +64 -0
  14. swh_vulns-0.2.1/README.rst +30 -0
  15. swh_vulns-0.2.1/conftest.py +8 -0
  16. swh_vulns-0.2.1/docs/.gitignore +3 -0
  17. swh_vulns-0.2.1/docs/Makefile +1 -0
  18. swh_vulns-0.2.1/docs/_static/.placeholder +0 -0
  19. swh_vulns-0.2.1/docs/_templates/.placeholder +0 -0
  20. swh_vulns-0.2.1/docs/conf.py +1 -0
  21. swh_vulns-0.2.1/docs/index.rst +16 -0
  22. swh_vulns-0.2.1/grpc-server/Cargo.toml +61 -0
  23. swh_vulns-0.2.1/grpc-server/build.rs +18 -0
  24. swh_vulns-0.2.1/grpc-server/proto/swhvulns.proto +54 -0
  25. swh_vulns-0.2.1/grpc-server/src/db.rs +53 -0
  26. swh_vulns-0.2.1/grpc-server/src/detected_vulnerabilities.rs +94 -0
  27. swh_vulns-0.2.1/grpc-server/src/lib.rs +176 -0
  28. swh_vulns-0.2.1/grpc-server/src/main.rs +124 -0
  29. swh_vulns-0.2.1/grpc-server/src/metrics.rs +158 -0
  30. swh_vulns-0.2.1/grpc-server/src/sentry.rs +119 -0
  31. swh_vulns-0.2.1/grpc-server/src/statsd.rs +158 -0
  32. swh_vulns-0.2.1/jenkins/install-non-python-deps.sh +7 -0
  33. swh_vulns-0.2.1/proto/swhvulns.proto +54 -0
  34. swh_vulns-0.2.1/pyproject.toml +97 -0
  35. swh_vulns-0.2.1/requirements-luigi.txt +1 -0
  36. swh_vulns-0.2.1/requirements-swh.txt +3 -0
  37. swh_vulns-0.2.1/requirements-test.txt +6 -0
  38. swh_vulns-0.2.1/requirements.txt +3 -0
  39. swh_vulns-0.2.1/setup.cfg +4 -0
  40. swh_vulns-0.2.1/swh/vulns/grpc/swhvulns.proto +54 -0
  41. swh_vulns-0.2.1/swh/vulns/grpc/swhvulns_pb2.py +47 -0
  42. swh_vulns-0.2.1/swh/vulns/grpc/swhvulns_pb2.pyi +176 -0
  43. swh_vulns-0.2.1/swh/vulns/grpc/swhvulns_pb2_grpc.py +101 -0
  44. swh_vulns-0.2.1/swh/vulns/grpc_server.py +107 -0
  45. swh_vulns-0.2.1/swh/vulns/naive_server.py +112 -0
  46. swh_vulns-0.2.1/swh/vulns/py.typed +0 -0
  47. swh_vulns-0.2.1/swh/vulns/pytest_plugin.py +306 -0
  48. swh_vulns-0.2.1/swh/vulns/tests/__init__.py +0 -0
  49. swh_vulns-0.2.1/swh/vulns/tests/test_grpc.py +133 -0
  50. swh_vulns-0.2.1/swh.vulns.egg-info/PKG-INFO +64 -0
  51. swh_vulns-0.2.1/swh.vulns.egg-info/SOURCES.txt +56 -0
  52. swh_vulns-0.2.1/swh.vulns.egg-info/dependency_links.txt +1 -0
  53. swh_vulns-0.2.1/swh.vulns.egg-info/entry_points.txt +2 -0
  54. swh_vulns-0.2.1/swh.vulns.egg-info/requires.txt +15 -0
  55. swh_vulns-0.2.1/swh.vulns.egg-info/scm_file_list.json +52 -0
  56. swh_vulns-0.2.1/swh.vulns.egg-info/scm_version.json +8 -0
  57. swh_vulns-0.2.1/swh.vulns.egg-info/top_level.txt +1 -0
  58. swh_vulns-0.2.1/tox.ini +65 -0
@@ -0,0 +1,12 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: v0.3.7
3
+ _src_path: swh-py-template/
4
+ description: Labeling of objects of the Software Heritage archives with known vulnerabilities
5
+ affecting them.
6
+ distribution_name: swh-vulns
7
+ have_cli: true
8
+ have_workers: false
9
+ package_root: swh/vulns
10
+ project_name: swh.vulns
11
+ python_minimal_version: '3.11'
12
+ readme_format: rst
@@ -0,0 +1 @@
1
+ pattern: Copyright (C) {years} The Software Heritage developers
@@ -0,0 +1,21 @@
1
+ *.egg-info/
2
+ *.pyc
3
+ .coverage
4
+ .eggs/
5
+ .hypothesis
6
+ .mypy_cache
7
+ .tox
8
+ __pycache__
9
+ build/
10
+ dist/
11
+ # these are symlinks created by a hook in swh-docs' main sphinx conf.py
12
+ docs/README.rst
13
+ docs/README.md
14
+ # this should be a symlink for people who want to build the sphinx doc
15
+ # without using tox, generally created by the swh-env/bin/update script
16
+ docs/Makefile.sphinx
17
+
18
+ target/
19
+
20
+ # These are backup files generated by rustfmt
21
+ **/*.rs.bk
@@ -0,0 +1,67 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: check-json
7
+ - id: check-yaml
8
+
9
+ - repo: https://github.com/python/black
10
+ rev: 26.5.1
11
+ hooks:
12
+ - id: black
13
+
14
+ - repo: https://github.com/PyCQA/isort
15
+ rev: 8.0.1
16
+ hooks:
17
+ - id: isort
18
+
19
+ - repo: https://github.com/pycqa/flake8
20
+ rev: 7.3.0
21
+ hooks:
22
+ - id: flake8
23
+ additional_dependencies: [flake8-bugbear==25.11.29, flake8-pyproject]
24
+
25
+ - repo: https://github.com/codespell-project/codespell
26
+ rev: v2.4.2
27
+ hooks:
28
+ - id: codespell
29
+ name: Check source code spelling
30
+ stages: [pre-commit]
31
+ - id: codespell
32
+ name: Check commit message spelling
33
+ stages: [commit-msg]
34
+
35
+ - repo: local
36
+ hooks:
37
+ - id: mypy
38
+ name: mypy
39
+ entry: env MYPY_NUM_WORKERS=8 mypy
40
+ args: [swh]
41
+ pass_filenames: false
42
+ language: system
43
+ types: [python]
44
+ - id: twine-check
45
+ name: twine check
46
+ description: call twine check when pushing an annotated release tag
47
+ entry: bash -c "ref=$(git describe) &&
48
+ [[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] &&
49
+ (python3 -m build --sdist && twine check $(ls -t dist/* | head -1)) || true"
50
+ pass_filenames: false
51
+ stages: [pre-push]
52
+ language: python
53
+ additional_dependencies: [twine, build]
54
+
55
+ - repo: https://github.com/nanoufo/copyright-hook
56
+ rev: v1.1.0
57
+ hooks:
58
+ - id: update-copyright
59
+ args: [--required]
60
+ files: ^.*\.py$
61
+ exclude: >
62
+ (?x)^(
63
+ .*__init__.py|
64
+ docs/conf.py
65
+ )$
66
+
67
+ exclude: ^swh/vulns/grpc/
@@ -0,0 +1,3 @@
1
+ Copyright (C) 2019 The Software Heritage developers
2
+
3
+ See http://www.softwareheritage.org/ for more information.
@@ -0,0 +1,78 @@
1
+ # Software Heritage Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as Software
6
+ Heritage contributors and maintainers pledge to making participation in our
7
+ project and our community a harassment-free experience for everyone, regardless
8
+ of age, body size, disability, ethnicity, sex characteristics, gender identity
9
+ and expression, level of experience, education, socioeconomic status,
10
+ nationality, personal appearance, race, religion, or sexual identity and
11
+ orientation.
12
+
13
+ ## Our Standards
14
+
15
+ Examples of behavior that contributes to creating a positive environment
16
+ include:
17
+
18
+ * Using welcoming and inclusive language
19
+ * Being respectful of differing viewpoints and experiences
20
+ * Gracefully accepting constructive criticism
21
+ * Focusing on what is best for the community
22
+ * Showing empathy towards other community members
23
+
24
+ Examples of unacceptable behavior by participants include:
25
+
26
+ * The use of sexualized language or imagery and unwelcome sexual attention or
27
+ advances
28
+ * Trolling, insulting/derogatory comments, and personal or political attacks
29
+ * Public or private harassment
30
+ * Publishing others' private information, such as a physical or electronic
31
+ address, without explicit permission
32
+ * Other conduct which could reasonably be considered inappropriate in a
33
+ professional setting
34
+
35
+ ## Our Responsibilities
36
+
37
+ Project maintainers are responsible for clarifying the standards of acceptable
38
+ behavior and are expected to take appropriate and fair corrective action in
39
+ response to any instances of unacceptable behavior.
40
+
41
+ Project maintainers have the right and responsibility to remove, edit, or
42
+ reject comments, commits, code, wiki edits, issues, and other contributions
43
+ that are not aligned to this Code of Conduct, or to ban temporarily or
44
+ permanently any contributor for other behaviors that they deem inappropriate,
45
+ threatening, offensive, or harmful.
46
+
47
+ ## Scope
48
+
49
+ This Code of Conduct applies within all project spaces, and it also applies when
50
+ an individual is representing the project or its community in public spaces.
51
+ Examples of representing a project or community include using an official
52
+ project e-mail address, posting via an official social media account, or acting
53
+ as an appointed representative at an online or offline event. Representation of
54
+ a project may be further defined and clarified by project maintainers.
55
+
56
+ ## Enforcement
57
+
58
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
59
+ reported by contacting the project team at `conduct@softwareheritage.org`. All
60
+ complaints will be reviewed and investigated and will result in a response that
61
+ is deemed necessary and appropriate to the circumstances. The project team is
62
+ obligated to maintain confidentiality with regard to the reporter of an
63
+ incident. Further details of specific enforcement policies may be posted
64
+ separately.
65
+
66
+ Project maintainers who do not follow or enforce the Code of Conduct in good
67
+ faith may face temporary or permanent repercussions as determined by other
68
+ members of the project's leadership.
69
+
70
+ ## Attribution
71
+
72
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
73
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
74
+
75
+ [homepage]: https://www.contributor-covenant.org
76
+
77
+ For answers to common questions about this code of conduct, see
78
+ https://www.contributor-covenant.org/faq
File without changes