Skip to content

Update dependency safety to v3 #1819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Update dependency safety to v3 #1819

merged 1 commit into from
Nov 19, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 9, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
safety ^2.3.4 -> ^3.0.0 age adoption passing confidence

Release Notes

pyupio/safety (safety)

v3.2.10

Compare Source

  • Support for scanning pyproject.toml files (#​625)
  • Update safety-schemas version used (#​624)
  • Fix basic poloicy test (#​622)

v3.2.9

Compare Source

  • chore: deprection-message-for-license-command (4149b70)
  • feat: add-pull-request-template (#​604) (61b2fe2)
  • fix: devcontainer fix (be42d8e)
  • fix: safety error when scan is run without being authed (5ec80dd)
  • feat: add-devcontainers-support (0591838)
  • fix: internal-server-error (04d7efb)
  • fix: clarify-vulnerabilities-found/ Fixed the issue where the vulnerabilities (07bc5b7)
  • chore: added check arg depreciation warning (78109e5)
  • feature: release-script: add release script (#​602) (cc49542)

v3.2.8

Compare Source

  • feat: enhance version comparison logic for check-updates command (#​605)
  • docs: add demo Jupyter Notebook (#​601)
  • feat: add script to generate CONTRIBUTORS.md with Shields.io badges based on merged PRs (#​600)
  • chore: fix CLI help text by removing rich formatting for cleaner output (#​599)
  • chore: hide system scan from help text (#​598)
  • chore: add LICENSES.md file to document dependency licenses (#​597)
  • docs: add SECURITY.md file with security policy and bug bounty details (#​593)

v3.2.7

Compare Source

  • fix/increase-auth-timeout: increase timeout to 5s (#​583)
  • Update Issue Templates: Add Feature Request Template and Improve Issue Submission Process (#​580)

v3.2.6

Compare Source

  • fix/update-schemas-0-0-4 (#​581)
  • chore/update-coc-email (#​579)
  • docs(contributing): add CONTRIBUTING.md with guidelines for contributors (#​571)
  • chore: update-network-url (#​569)

v3.2.5

Compare Source

  • fix: increment schemas version (#​567)
  • Add SLA Document (#​565)
  • Add Table of Contents to README.md (#​564)
  • docs: code of conduct (#​559)
  • Add More Badges (#​558)
  • feat: fixed issue responder (#​561)
  • feat(logger): config.ini, proxy, network stats (#​547)
  • refactor: replace private typer functions with rich module equivalents (#​556)
  • feat(safety_cli): docstrings, type hints, comments (#​549)
  • feat: add GitHub Action to automatically respond to new issues (#​554)
  • readme: add download badge to readme (#​557)
  • fix(debug): fix --debug flag and associated tests (#​552)
  • chore: release 3.2.4 (#​545)
  • fix(cache): handle get_from_cache=None and ensure directory exists (#​544)
  • REQUEST_TIMEOUT Env Var (#​541)
  • Update URLs, Lint (#​540)

v3.2.4

Compare Source

  • Handle get_from_cache=None and ensure directory exists (#​538)
  • Switch filelock package to compatible release clause (#​538)
  • Add filelock to install_requires (#​538)

v3.2.3

Compare Source

  • Increase request timeout to 30 seconds (#​535)
  • fix: fail on none severities (#​534)

v3.2.2

Compare Source

  • fix: include scan template in build (#​531)

v3.2.1

Compare Source

  • Support for scanning pyproject.toml files (#​625)
  • Update safety-schemas version used (#​624)
  • Fix basic poloicy test (#​622)

v3.2.0

Compare Source

  • feat: add SAFETY_DB_DIR env var to the scan command (#​523)
  • fix: update pyinstaller target (#​522)
  • docs: added note on hiring and added careers page link (#​510)

v3.1.0

Compare Source

  • fix: ensure compatibility with Pydantic version 2.0 (#​509)
  • feat: introduce --headless flag to enable an alternative login mechanism that bypasses the need for a local web server. (#​508)

v3.0.1

Compare Source

  • fix: add back the license legacy cmd (#​498)
  • perf: unpin authlib and remove jwt

v3.0.0

Compare Source

Safety 3.0.0 major version release!
Main updates
  • Added scan command, which scans a project’s directory for all Python dependencies and includes many improvements over the check command, including automatic Python project scanning, native support for Poetry and Pipenv files, Python virtual environment folders, and more granular configuration options.
  • Added auth commands, enabling new browser-based authentication of Safety CLI.
  • An updated safety policy file schema to support new scan and system-scan commands. This policy file schema is a breaking change from the policy schema used for safety check. To migrate a Safety 2.x policy, see Migrating from Safety 2.x to Safety CLI 3.
  • Updated screen output to modern interactive interface, with new help interfaces.
  • Updated to new JSON output structure to support new scan command, other ecosystems, and other security findings.
  • Added a supporting safety-schemas project dependency, also published and maintained by Safety, which defines Safety vulnerability database file, Safety CLI policy file, and Safety CLI JSON output schemas as pydantic models, formalizing these into testable and versioned schemas.
New scan command:
  • New scan command: scans a Python project directory for Python dependencies and security vulnerabilities. Safety scan replaces safety check with a more powerful and easier to use command. The scan command:
  • Finds and scans Python dependency files and virtual environments inside the target directory without needing to specify file or environment locations.
  • Adds native scanning and reporting for Poetry and Pipenv manifest files, and Python virtual environment folders.
  • Adds configuration of scanning rules to;
    • exclude files and folders from the scan using Unix shell-style wildcards only
    • Include files to be scanned
    • Max folder depth setting
  • Reporting configuration rules
    • Reporting rules defining which types and specific vulnerabilities to include or ignore stay the same as safety 2.x, although now in a slightly different structure.
  • Failing rules
    • Adds ability to configure rules for when safety should return a non-zero (failing) exit code, which can be different from reporting rules under the report field.
  • Auto-updating rules
    • Adds ability to easily update insecure package versions in pip requirements files.
Other new commands:
  • Added auth command: manages Safety CLI’s authentication in development environments, allowing easy authentication via the browser.
    • auth login - adds ability to authenticate safety cli via the browser
    • auth register - adds ability to register for a Safety account via the CLI, and get scanning within minutes
    • auth status -
    • auth logout -
    • safety check command can still be used with the API key --key argument, and scan and system-scan commands should also be
  • Added configure command: configures safety cli using a config.ini file, either saved to the user settings or system settings. This can be used to configure safety’s authentication methods and global proxy details.
  • Added system-scan command (beta): Adds the system-scan command, which scans a machine for Python files and environments, reporting these to screen output. system-scan is an experimental beta feature that can scan an entire drive or machine for Python dependency files and Python virtual environments, reporting on packages found and their associated security vulnerabilities.
  • Added check-updates command: Check for version updates to Safety CLI, and supports screen and JSON format outputs. Can be used in organizations to test and rollout new version updates as recommended by Safety Cybersecurity.
New policy file schema for scan and system-scan commands
  • New policy file schema to support safety scan and safety system-scan.
    Adds scanning-settings root property, which contains settings to configure rules and settings for how safety traverses the directory and subdirectories being scanned, including “exclude” rules, “include” rules, the max directory depth to scan and which root directories safety system-scan should start from.
  • Adds report root property, which defines which vulnerability findings safety should auto-ignore (exclude) in its reporting. Supports excluding vulnerability IDs manually, as well as vulnerability groups to ignore based on CVSS severity score.
  • Adds new fail-scan-with-exit-code root property, which defines when safety should exit with a failing exit code. This separates safety’s reporting rules from its failing exit code rules, which is a departure from Safety 2.x which had combined rulesets for these. Failing exit codes can be configured based on CVSS severity score.
  • Note that the old safety check command still supports and relies on the policy schema from safety 2.3.5 and below, meaning no changes are required when migrating to safety 2.x to Safety 3.0.0 when only using the safety check command.
New global options and configurations
  • Added global --stage option, to set the development lifecycle stage for the scan and system-scan commands.
  • Added global --key option, to set a Safety API key for any command, including scan, system-scan and check.
Other
  • Safety now requires Python>=3.7. Python 3.7 doesn't have active security support from the Python foundation, and we recommend upgrading to at least Python >= 3.8 whenever possible. Safety’s 3.0.0 Docker image can still be used to scan and secure all Python projects, regardless of Python version. Refer to our Documentation for details.
  • Dropped support for the license command. This legacy command is being replaced by the scan command. Users relying on the license command should continue to use Safety 2.3.5 or 2.4.0b2 until Safety 3 adds license support in an upcoming 3.0.x release.
  • Add deprecation notice to safety check command, since this is now replaced by safety scan, a more comprehensive scanning command. The check command will continue receiving maintenance support until June 2024.
  • Add deprecation notice to safety alert command, which works in tandem with the safety check command. Safety alert functionality is replaced by Safety Platform. The alert command will continue receiving maintenance support until June 2024.
  • safety validate will assume 3.0 policy file version by default.
Small updates/ bug fixes

v2.3.5

Compare Source

  • Pinned packaging dependency to a compatible range.
  • Pinned the CI actions to the runner image with Python 3.6 support.

Configuration

📅 Schedule: Branch creation - "every weekend" in timezone US/Eastern, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/safety-3.x branch 12 times, most recently from a9b41e3 to a322cf1 Compare November 18, 2024 20:49
@renovate renovate bot force-pushed the renovate/safety-3.x branch from 0896d3d to 9f74a14 Compare November 19, 2024 18:19
@shanbady shanbady self-requested a review November 19, 2024 18:20
@shanbady shanbady merged commit 86560c8 into main Nov 19, 2024
11 checks passed
@shanbady shanbady deleted the renovate/safety-3.x branch November 19, 2024 18:45
jonkafton added a commit that referenced this pull request Nov 20, 2024
* Release 0.24.3

* Release date for 0.24.3

* Server rendered search page results

* v2 drawer certification updates (#1823)

* update certification display in v2 drawer to match latest designs

* don't show price info item if runs have differing data

* MicroMasters not Micromasters

* if there is no price for the certificate but it's indicated that one is included, display that

* if resource is free, includes a certification but has no prices, still display the pill in the info item

* generate migration for MicroMasters spelling change

* fix certificate pill padding on mobile

* Unit channel page and search prefetch

* Featured list and testimonials only for unit channels

* v2 learning resource drawer formats and location (#1826)

* add format info item

* display location if format is in_person

* add tests

* also show location for hybrid courses

* LocalDate and NoSSR components to render localized dates only on client

* Revert "LocalDate and NoSSR components to render localized dates only on client"

This reverts commit b4ccd6d.

* LocalDate and NoSSR components to render localized dates only on client (#1831)

* LocalDate and NoSSR components to render localized dates only on client

* Remove unnecessary React.Fragment

* separate starts and as taught in, show anytime availability (#1828)

* refactor starts / as taught in functionality to show on separate lines, show "anytime" in starts if availability is anytime

* fix rebase mishap

* Map address search params

* Search params test

* Update dependency pytest-cov to v6 (#1818)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency safety to v3 (#1819)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* URL search param validation anf transforms to align with course-search-utils

* Update dependency django-anymail to v12 (#1815)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* vector search endpoint (#1827)

* adding initial vector search view

* adding working vector results endpoint

* regenerate openapi spec

* fixing format of returned results

* adding test

* patching qdrant client

* moving to v0 api

* switch to custom serializer for vector search

* fix v0 url

* using minimal serializer

* returning minimal response for vector results

* regenerate spec

* adding some other useful bits to response

* fixing response for empty query and adjusting test

* regenerate spec

* uninheriting from searchrequest serializer

* updating oai spec

* updating oai spec

* Update dependency @mui/lab to v6.0.0-beta.15 (#1830)

* Update dependency @mui/lab to v6.0.0-beta.15

* update lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: shankar ambady <[email protected]>

* Update to use validators from course-search-utils

---------

Co-authored-by: Doof <[email protected]>
Co-authored-by: Carey P Gumaer <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Shankar Ambady <[email protected]>
Co-authored-by: shankar ambady <[email protected]>
mbertrand pushed a commit that referenced this pull request Nov 22, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@odlbot odlbot mentioned this pull request Nov 25, 2024
19 tasks
mbertrand pushed a commit that referenced this pull request Dec 2, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant