{"id":38076993,"url":"https://github.com/openpitrix/watcher","last_synced_at":"2026-01-16T20:45:11.263Z","repository":{"id":91507860,"uuid":"180920974","full_name":"openpitrix/watcher","owner":"openpitrix","description":"A simple service to trigger a handler when WATCHER_WATCHED_FILE is updated.","archived":false,"fork":false,"pushed_at":"2019-04-17T11:07:42.000Z","size":207,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-06-20T13:36:20.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/openpitrix.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":"2019-04-12T03:11:13.000Z","updated_at":"2019-04-17T10:11:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"dffa3196-1ee6-42a9-8c7a-e6359ee5b84b","html_url":"https://github.com/openpitrix/watcher","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/openpitrix/watcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Fwatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Fwatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Fwatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Fwatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpitrix","download_url":"https://codeload.github.com/openpitrix/watcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Fwatcher/sbom","scorecard":{"id":709916,"data":{"date":"2025-08-11","repo":{"name":"github.com/openpitrix/watcher","commit":"eae39a230420a4d817614f129fb22bfa9e39f448"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":6,"reason":"Found 2/3 approved changesets -- score normalized to 6","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"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":"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":"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":"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":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: containerImage not pinned by hash: Dockerfile:4","Warn: containerImage not pinned by hash: Dockerfile:15: pin your Docker image by updating alpine:3.7 to alpine:3.7@sha256:8421d9a84432575381bfabd248f1eb56f3aa21d9d7cd2511583c68c9b7511d10","Warn: goCommand not pinned by hash: vendor/google.golang.org/grpc/vet.sh:24","Warn: goCommand not pinned by hash: vendor/google.golang.org/grpc/vet.sh:26","Info:   0 out of   2 containerImage dependencies pinned","Info:   1 out of   3 goCommand 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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 4 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-22T07:49:31.006Z","repository_id":91507860,"created_at":"2025-08-22T07:49:31.007Z","updated_at":"2025-08-22T07:49:31.007Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-16T20:45:10.838Z","updated_at":"2026-01-16T20:45:11.252Z","avatar_url":"https://github.com/openpitrix.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Watcher\n\n[![Build Status](https://travis-ci.org/openpitrix/watcher.svg)](https://travis-ci.org/openpitrix/watcher)\n[![Docker Build Status](https://img.shields.io/docker/build/openpitrix/watcher.svg)](https://hub.docker.com/r/openpitrix/watcher/)\n[![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/openpitrix/openpitrix/blob/master/LICENSE)\n\n----\n\n**watcher** is a simple service to trigger a handler when **WATCHER_WATCHED_FILE** is updated.\n\nIn openpitrix, the global config is load into ConfigMap when depolied by helm or kubernetes; watcher watches mounted volume dirs from ConfigMap and notifies the target process(UpdateOpenPitrixEtcd) that the config map has been changed.\nIt currently only supports handler UpdateOpenPitrixEtcd.\n\n\n----\n\n## Usage\n\n#### Local\n\n```$xslt\n$ govendor sync\n$ export WATCHER_HANDLER=UpdateOpenPitrixEtcd \\\n  WATCHER_WATCHED_FILE=./test/global_config.yaml \\\n  WATCHER_DURATION=10 \\\n  WATCHER_LOG_LEVEL=debug \\\n  WATCHER_ETCD_PREFIX=openpitrix \\\n  WATCHER_ETCD_ENDPOINTS=127.0.0.1:2379 \\\n  IGNORE_KEYS='{\"runtime\": true, \"cluster\": {\"registry_mirror\": true}}'\n\n$ cd watcher\n$ go run cmd/watch/main.go\n```\n\n#### Docker\n\n```$xslt\ndocker run -it -d \\\n       -v ${CONFIG_DIR}:/opt/config.yaml \\\n       -e WATCHER_HANDLER=UpdateOpenPitrixEtcd \\\n       -e WATCHER_WATCHED_FILE=/opt/config.yaml \\\n       -e WATCHER_DURATION=10 \\\n       -e WATCHER_LOG_LEVEL=debug \\\n       -e WATCHER_ETCD_PREFIX=openpitrix \\\n       -e WATCHER_ETCD_ENDPOINTS=127.0.0.1:2379 \\\n       -e IGNORE_KEYS='{\"runtime\": true, \"cluster\": {\"registry_mirror\": true}}' \\\n       --name watcher openpitrix.io/watcher\n```\n\n#### Helm\n\nrefrence: https://github.com/openpitrix/helm-chart","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpitrix%2Fwatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpitrix%2Fwatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpitrix%2Fwatcher/lists"}