{"id":15294683,"url":"https://github.com/freddez/cfg","last_synced_at":"2026-05-19T14:06:04.464Z","repository":{"id":62354896,"uuid":"168977439","full_name":"freddez/cfg","owner":"freddez","description":"git based config files manager and installer","archived":false,"fork":false,"pushed_at":"2019-02-14T13:43:15.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-02T10:37:18.903Z","etag":null,"topics":["backup","configuration-management","deployment","git","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/freddez.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2019-02-03T18:19:01.000Z","updated_at":"2019-10-30T14:24:48.000Z","dependencies_parsed_at":"2022-10-31T10:48:09.196Z","dependency_job_id":null,"html_url":"https://github.com/freddez/cfg","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/freddez/cfg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fcfg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fcfg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fcfg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fcfg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freddez","download_url":"https://codeload.github.com/freddez/cfg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddez%2Fcfg/sbom","scorecard":{"id":410248,"data":{"date":"2025-08-11","repo":{"name":"github.com/freddez/cfg","commit":"720e76b3dffec61638d05a1c936a0a655f3d1c0a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"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":"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":"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Warn: project license file does not contain an FSF or OSI license."],"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"}}]},"last_synced_at":"2025-08-18T22:30:54.978Z","repository_id":62354896,"created_at":"2025-08-18T22:30:54.978Z","updated_at":"2025-08-18T22:30:54.978Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33219407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"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":["backup","configuration-management","deployment","git","python"],"created_at":"2024-09-30T17:06:00.288Z","updated_at":"2026-05-19T14:06:04.435Z","avatar_url":"https://github.com/freddez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"cfg : git based config files manager and installer\n==================================================\n\nThis command line tool helps you to keep your customized system configuration files in a\ngit repository.\n\nInstallation\n------------\n\nIn addition of python3 and related modules, cfg depends of these binaries:\n\n- git\n- colordiff\n\nLatest release could be installed via::\n\n  pip3 install cfg-manager\n  \nOr frome these sources::\n\n  sudo setup.py install\n\nQuickstart\n----------\n\nA *cfg* based project is basically composed of:\n\n- a *git* repository with a ``src`` directory where your customized configuration files\n  are located, for example::\n\n    src/etc/aliases\n    src/etc/apache2/ports.conf\n    ...\n\n- a ``cfg_params.py`` file with at least the *TARGET* parameter set, for example::\n\n    TARGET = \"/\"\n\nOnce *TARGET* parameter is configured, you can add existing config file with::\n\n  cfg add /etc/postfix/main.cf\n\nThe previous command will create ``src/etc/postfix/main.cf`` file and commit it to the\nrepository. Don't forget to ``git push`` your work.\n\nTo see if your ``src`` and target directory differs, do a::\n\n  cfg check\n\nIt will compare the two directories and eventually output differences::\n\n  checking content...\n  /etc/aliases :\n  2a3\n  \u003e root:        f@idez.net\n\nAnd then::\n\n  cfg install\n\nWill install the modified files, producing the same output. Original dest files are\nbacked up with ``.old`` extension.\n\nTemplate files\n--------------\n\nFor multiple environments usage (duplicated servers, sub-configurations), a pattern\nsubstitution system is provided:\n\nFor example let's say you have in your ``cfg_params.py``:\n\n.. code-block:: python\n\n  import socket\n  import sys\n  HOSTNAME = socket.gethostname()\n  if HOSTNAME == \"master-kf\":\n      TARGET = \"/\"\n      HOST_IP = \"5.223.34.110\"\n      PEER_IP = \"5.68.252.23\"\n  elif HOSTNAME == \"backup-kf\":\n      TARGET = \"/\"\n      HOST_IP = \"5.68.252.23\"\n      PEER_IP = \"5.223.34.110\"\n  elif HOSTNAME == \"bic\":\n      TARGET = \"/home/fredz/tmp/dst_cfg\"\n      HOST_IP = \"127.0.0.1\"\n      PEER_IP = \"666.666.666.666\"\n  else:\n      print(\"cfg_params.py : uknown host :\", HOSTNAME)\n      sys.exit(0)\n\nIf you want to use these parameters in one of your config files, let's say ``/etc/keepalived/keepalived.conf``:\n\n1. add it to your repo with ``cfg add``,\n2. rename it to ``/etc/keepalived/cfg.keepalived.conf``\n3. use ``cfg[PATTERN]`` in your file:\n\n   .. code-block:: squid\n\n    vrrp_instance VI_1 {\n        state BACKUP\n        interface ens3\n        unicast_src_ip =cfg[HOST_IP]\n        unicast_peer {\n            =cfg[PEER_IP]\n        }\n    \n        virtual_router_id 101\n        priority 101\n        advert_int 4\n        nopreempt\n        virtual_ipaddress {\n            666.999.999.666\n        }\n        notify /usr/local/bin/ovh_ip_up.py\n    }\n\nNotes:\n\n- As shown in previous example, you can use python code to face various environment\n  configurations.\n- **Only uppercase parameters names are exported**.\n\nPer-host files\n--------------\n\nWhen configuration files are too different, you can provide host-dedicated versions of\nconfig files : simply prefix desired filenames with \"cfg-[HOSTNAME].\" where [HOSTNAME] is\nthe target *hostname*. For example:\n\n   src/etc/cfg-bic.aliases\n\n\nPermissions\n-----------\n\nBecause git repositories only handle executable flag permissions,target files\npermissions are preserved. It is the more simple and safe approach because most of the\ntimes, target files already exists.\n\nIn a future release, I could had *in repository* permission management, but I have no\nsimple approach yet.\n\n\nInternals\n---------\n\nFor safety and fast processing, src and target directories files contents are compared\nusing git hashes:\n  - pre-computed src git sha1 hashes for src\n  - ``git hash-object --stdin-paths`` for src, in one system call.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreddez%2Fcfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreddez%2Fcfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreddez%2Fcfg/lists"}