{"id":41452363,"url":"https://github.com/oscaroox/objection-visibility","last_synced_at":"2026-01-23T15:29:52.300Z","repository":{"id":21935372,"uuid":"94480181","full_name":"oscaroox/objection-visibility","owner":"oscaroox","description":"Objectionjs plugin to whitelist/blacklist model properties ","archived":false,"fork":false,"pushed_at":"2023-03-06T06:56:49.000Z","size":558,"stargazers_count":45,"open_issues_count":8,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T05:36:12.999Z","etag":null,"topics":["blacklist","blacklist-properties","json","objection-orm","objection-visibility","objectionjs","whitelist"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oscaroox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-15T21:27:15.000Z","updated_at":"2023-10-07T01:29:41.000Z","dependencies_parsed_at":"2024-06-18T16:55:57.419Z","dependency_job_id":"ed46d934-8e95-497e-b1cf-efe89ae66f01","html_url":"https://github.com/oscaroox/objection-visibility","commit_stats":{"total_commits":62,"total_committers":6,"mean_commits":"10.333333333333334","dds":0.4516129032258065,"last_synced_commit":"4c6ec34530110ea713c70f71811cfc7f2f72c03b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/oscaroox/objection-visibility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscaroox%2Fobjection-visibility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscaroox%2Fobjection-visibility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscaroox%2Fobjection-visibility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscaroox%2Fobjection-visibility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oscaroox","download_url":"https://codeload.github.com/oscaroox/objection-visibility/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oscaroox%2Fobjection-visibility/sbom","scorecard":{"id":713259,"data":{"date":"2025-08-11","repo":{"name":"github.com/oscaroox/objection-visibility","commit":"4c6ec34530110ea713c70f71811cfc7f2f72c03b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"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/12 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":"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":"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/node.js.yml: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":"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":"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/node.js.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/oscaroox/objection-visibility/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/oscaroox/objection-visibility/node.js.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction 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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-4jv9-3563-23j3","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-jqv5-7xpx-qj74","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T08:44:48.034Z","repository_id":21935372,"created_at":"2025-08-22T08:44:48.034Z","updated_at":"2025-08-22T08:44:48.034Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28694573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","response_time":59,"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":["blacklist","blacklist-properties","json","objection-orm","objection-visibility","objectionjs","whitelist"],"created_at":"2026-01-23T15:29:51.559Z","updated_at":"2026-01-23T15:29:52.287Z","avatar_url":"https://github.com/oscaroox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![workflow](https://github.com/oscaroox/objection-visibility/actions/workflows/node.js.yml/badge.svg)\n\n# objection-visibility\n\n\nThis plugin adds the ability to whitelist or blacklists model properties.\n\n\n## Installation\n\n```bash\nnpm install objection-visibility\n```\n\n## Usage\nYou can enable this plugin by either setting the static property `hidden` or `visible` to your model.\n\nIt is possible to have a model which have both properties defined, note that the `visible` method is called first and the `hidden` method second. \n\n\n### Blacklist properties\n\nTo enable blacklisting on your model add the static property `hidden` on your model and return an array with the fields you want to blacklist.\n\nThe listed fields are gone after being serialized to json\n\n```js\nconst Model = require('objection').Model\nconst visibilityPlugin = require('objection-visibility').default;\n\nclass User extends visibilityPlugin(Model) {\n  static get hidden() {\n    return ['hashed_password'];\n  }\n}\n\n```\n\n### Whitelist properties\nTo enable whitelisting on your model add a static property `visible` on your model and return an array with the fields you want to be whitelisted\n\nThe listed fields will be the only properties available after being serialized to json\n\n```js\nconst Model = require('objection').Model\nconst visibilityPlugin = require('objection-visibility').default;\n\nclass User extends visibilityPlugin(Model) {\n  static get visible() {\n    return ['firstName', 'id']\n  }\n}\n```\n\n## Using with multiple models\n\nCan be used on a base model and have it readily available on all your models\n\nModels that dont have the static properties `visible` or `hidden` will remain untouched.\n\n```javascript\n\n    // base.js\n    class BaseModel extends visibilityPlugin(Model) {}\n\n    // post.js\n    class Post extends BaseModel {\n        static get visible () {\n            return ['description', 'title']\n        }\n    }\n\n    // user.js\n    class User extends BaseModel {\n        static get hidden () {\n            return ['hashedPassword']\n        }\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscaroox%2Fobjection-visibility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foscaroox%2Fobjection-visibility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foscaroox%2Fobjection-visibility/lists"}