{"id":26328472,"url":"https://github.com/luanphandinh/pits","last_synced_at":"2026-05-19T17:12:41.345Z","repository":{"id":57324942,"uuid":"234347987","full_name":"luanphandinh/pits","owner":"luanphandinh","description":"postman integration test utils","archived":false,"fork":false,"pushed_at":"2020-01-27T15:49:25.000Z","size":85,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T05:34:39.203Z","etag":null,"topics":["integration-testing","postman","postman-collection","postman-test"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luanphandinh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-16T15:16:44.000Z","updated_at":"2020-01-27T15:49:24.000Z","dependencies_parsed_at":"2022-09-06T06:40:57.333Z","dependency_job_id":null,"html_url":"https://github.com/luanphandinh/pits","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/luanphandinh/pits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanphandinh%2Fpits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanphandinh%2Fpits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanphandinh%2Fpits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanphandinh%2Fpits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luanphandinh","download_url":"https://codeload.github.com/luanphandinh/pits/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanphandinh%2Fpits/sbom","scorecard":{"id":601518,"data":{"date":"2025-08-11","repo":{"name":"github.com/luanphandinh/pits","commit":"fd85a79fa64999dcc6d7eee3cdc9c14af7d5e3b1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Warn: no topLevel permission defined: .github/workflows/publish.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/luanphandinh/pits/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/luanphandinh/pits/publish.yaml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yaml:13","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T00:33:44.672Z","repository_id":57324942,"created_at":"2025-08-21T00:33:44.672Z","updated_at":"2025-08-21T00:33:44.672Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33225440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["integration-testing","postman","postman-collection","postman-test"],"created_at":"2025-03-15T21:17:01.823Z","updated_at":"2026-05-19T17:12:41.329Z","avatar_url":"https://github.com/luanphandinh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pit\nA [postman](https://www.getpostman.com) integration test utils.\\\nTaking advantage of postman's `pre-request script` and `test-script`.\\\nThis utils help `describe and test` your collection with simple syntax.\n\n# Caution\nSince postman doesn't have clear `\"scopes\"` like javascript variables, instead have their own [pm.variables](https://learning.getpostman.com/docs/postman/variables-and-environments/variables/).\\\nIn order to make scripts work, there will be a few `eval()` functions in `lib/t.js`, feel free and inspect the code.\\\nIt's only `eval()` what you code, so please make sure you don't add any danger or malicious script into `describe, test or before` code blocks.\n\n# Install\n```\nnpm i pits\n```\n\n# Project structure ([more on example](https://github.com/luanphandinh/pits/tree/master/example))\n```\nsrc\n  |__GitHubApi\n  |     |__GetUserSuite.js\n  |     |__OtherSuite.js\n  |__googleSuite.js\n  |__spotifySuite.js\n  |\n  |__.pit_collection.js\n  |__package.json\n```\n\n# Suite declaration\n\n`.pit_collection.js`\n```javascript\nconst path = require(\"path\");\n\nmodule.exports = {\n  name: \"Example Fun Postman\",\n  suites: {\n    includes: [\"Suite.js\"], // patterns for `suite` file, could be anything.\n    dirs: [path.join(__dirname)] // paths where `suite` file should be placed.\n  }\n};\n```\n\nDefine your simple script like\n[example/googleSuite.js](https://github.com/luanphandinh/pits/blob/master/example/googleSuite.js)\n```javascript\nconst { describe, before, test } = require(\"pits\");\n\nmodule.exports = describe(\"Let's check google\", () =\u003e {\n  before(\"200\", () =\u003e {\n    console.log(\"This will be called before sending request\");\n    console.log(\"{{request_url}} is hard_code, will be more dynamic later\");\n    pm.variables.set(\"request_url\", \"https://google.com\");\n  });\n\n  test(\"200\", \"Test 200 description\", () =\u003e {\n    pm.response.to.have.status(200);\n  });\n\n  before(\"404\", () =\u003e {\n    console.log(\"This should call when init\");\n    pm.variables.set(\"request_url\", \"https://google.com/404\");\n  });\n\n  test(\"404\", \"Test 404\", () =\u003e {\n    pm.response.to.have.status(404);\n  });\n});\n```\n\n# Run\n```\nnode -e 'require(\"pits\").extract()'\n```\nThis `extract()` function will use the config from `.pit_collection.js` file to generate `.postman_collection.json` into current folder.\n\nIf you have [newman](https://www.npmjs.com/package/newman) installed:\n```\nnewman run test.postman_collection.json\n```\n\n# [Flow diagram](https://www.draw.io/?lightbox=1\u0026highlight=0000ff\u0026edit=_blank\u0026layers=1\u0026nav=1\u0026title=pit.svg#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1LAMukZHOzEI1DuxBVMTw8yL-L2ArNVDI%26export%3Ddownload)\n# ![diagram](https://github.com/luanphandinh/pit/blob/master/flow.svg)\n\n# TODO\n* Adding variables file.\n* Improve `pit_collection.json`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluanphandinh%2Fpits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluanphandinh%2Fpits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluanphandinh%2Fpits/lists"}