{"id":19478054,"url":"https://github.com/snyk/python-fix","last_synced_at":"2025-04-25T14:32:48.198Z","repository":{"id":39592482,"uuid":"360118991","full_name":"snyk/python-fix","owner":"snyk","description":"🔓 Snyk ecosystem remediation strategies used with Snyk CLI to automatically remediate fixable issues.","archived":false,"fork":false,"pushed_at":"2024-07-16T11:05:49.000Z","size":739,"stargazers_count":2,"open_issues_count":4,"forks_count":5,"subscribers_count":53,"default_branch":"main","last_synced_at":"2025-04-03T23:11:22.879Z","etag":null,"topics":["security","security-tools","snyk","vulnerabilities"],"latest_commit_sha":null,"homepage":"https://www.snyk.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-21T09:59:14.000Z","updated_at":"2024-10-29T18:36:38.000Z","dependencies_parsed_at":"2024-07-16T12:59:31.519Z","dependency_job_id":null,"html_url":"https://github.com/snyk/python-fix","commit_stats":{"total_commits":119,"total_committers":5,"mean_commits":23.8,"dds":0.3025210084033614,"last_synced_commit":"4306de6f948f238a8e455ed5d48c0b1cdb66b730"},"previous_names":[],"tags_count":381,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fpython-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fpython-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fpython-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fpython-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snyk","download_url":"https://codeload.github.com/snyk/python-fix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250834243,"owners_count":21494937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["security","security-tools","snyk","vulnerabilities"],"created_at":"2024-11-10T19:46:53.623Z","updated_at":"2025-04-25T14:32:47.952Z","avatar_url":"https://github.com/snyk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Snyk logo](https://snyk.io/style/asset/logo/snyk-print.svg)\n\n***\nSnyk finds, fixes and monitors your dependencies for known vulnerabilities.\nBoth on an ad hoc basis and as part of your CI (Build) system.\n\n# Snyk Python Fix\nSnyk ecosystem fix remediation strategies used with [Snyk\nCLI](https://github.com/snyk/snyk) to automatically apply recommended issue\nfixes.\n\n## Table of Contents\n- [Development setup](#development-setup)\n\n- Python Support\n  - [Pipfile (pipenv)](packages/pipenv-pipfile/SUPPORTED.md)\n  - [Poetry](packages/poetry/SUPPORTED.md)\n\n\n## Development setup\n- `npm install`\n- `npx lerna bootstrap`\n\n### Running tests\n`lerna test`\n\n### Running individual package tests\n`lerna run test --scope \u003cpackage_name_from_package_json\u003e --stream`\n\n### Upgrading dependencies\n\nSimplest way is to use global `npm-check-updates` package to update package.json.\n\n```\nnpx lerna exec -- npx npm-check-updates -u\nnpx lerna exec -- npm install\n```\n\n### CircleCI Matrix\n\nThe CircleCI test suite aims to test the library across a broad a compatibility\nset as possible.\n\n1. NodeJS versions from 12 up (supported by the Snyk CLI)\n2. Python versions\n3. Package manager versions e.g. pipenv, poetry etc.\n\nSee SUPPORTED.md or .circleci/config.yml for more details on specific versions.\n\n#### Conditional Tests\n\nWe use the `lerna changed` command to only run tests if the changes will impact\na given package. This reduces the load and test time.\n\n#### Node Support\n\nIn order to run these tests we need to ensure that our test suite runs on\nNodeJS 12 and above. In order to do this we:\n\n1. Compile the library and test code down to JavaScript in the ci/dist\n   directory. This allows us to keep using the latest packages and node\n   versions for our tooling e.g. lerna and typescript.\n2. Pin Jest at v28 which is the last version to support node 12. Once we drop\n   support for 12 in the Snyk CLI we can remove this restriction.\n\nThe CI Workflow then is as follows for each package and combination of Node,\nPython, Package Manager:\n\n0. Determine if the package is affected by the changes.\n1. Using a recent nodejs image, we install dependencies and compile the source\n   and test codebase into the ci/dist directory using the config in the ci\n   directory for the package via `npm run ci:build`\n2. Use nvm to switch to the appropriate node version.\n2. Run the test suite using Jest via `npm run ci:test`\n\n\nFor faster local development each package still supports running `npm run test`\nwhich will use ts-jest and transpile the TypeScript into JavaScript on the fly.\n\n### CircleCI Configuration\n\nWe use CircleCI to run our continuous integration pipeline for the repository.\nCertain jobs require write permissions to push tags back to the GitHub org,\npermissions are managed via a read/write deploy key managed under the project\nsettings in CircleCI. The credentials for the account can be found in 1Password\nunder the `snyk/python-fix deploy key` entry.\n\nThe GH_TOKEN and NPM_TOKEN environment variables are also provided via the\n`snyk/python-fix/circleci` CircleCI context. Details for these can be found\nunder the `team-fix@snyk.io` entry in 1Password. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnyk%2Fpython-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnyk%2Fpython-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnyk%2Fpython-fix/lists"}