{"id":17160191,"url":"https://github.com/obfusk/shtst","last_synced_at":"2026-01-20T14:07:50.968Z","repository":{"id":57467013,"uuid":"341008972","full_name":"obfusk/shtst","owner":"obfusk","description":"shtst - simple cli testing","archived":false,"fork":false,"pushed_at":"2022-08-07T15:06:34.000Z","size":43,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-07T16:32:32.378Z","etag":null,"topics":["bash","cli","sh","shell","test"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obfusk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.GPLv3","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-21T21:34:01.000Z","updated_at":"2022-08-07T15:06:36.000Z","dependencies_parsed_at":"2022-09-10T03:43:31.973Z","dependency_job_id":null,"html_url":"https://github.com/obfusk/shtst","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/obfusk/shtst","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obfusk%2Fshtst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obfusk%2Fshtst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obfusk%2Fshtst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obfusk%2Fshtst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obfusk","download_url":"https://codeload.github.com/obfusk/shtst/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obfusk%2Fshtst/sbom","scorecard":{"id":700921,"data":{"date":"2025-08-11","repo":{"name":"github.com/obfusk/shtst","commit":"46c405e290be10c585d7c5872cafc6b9ef5c7ea6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/obfusk/shtst/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/obfusk/shtst/ci.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:25","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.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":"Code-Review","score":0,"reason":"Found 0/15 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":"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":"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.GPLv3:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE.GPLv3: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"}}]},"last_synced_at":"2025-08-22T05:11:24.904Z","repository_id":57467013,"created_at":"2025-08-22T05:11:24.904Z","updated_at":"2025-08-22T05:11:24.904Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28604712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"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":["bash","cli","sh","shell","test"],"created_at":"2024-10-14T22:24:00.061Z","updated_at":"2026-01-20T14:07:50.942Z","avatar_url":"https://github.com/obfusk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- {{{1\n\n    File        : README.md\n    Maintainer  : FC Stegerman \u003cflx@obfusk.net\u003e\n    Date        : 2022-08-07\n\n    Copyright   : Copyright (C) 2022  FC Stegerman\n    Version     : v0.1.1\n    License     : GPLv3+\n\n}}}1 --\u003e\n\n[![GitHub Release](https://img.shields.io/github/release/obfusk/shtst.svg?logo=github)](https://github.com/obfusk/shtst/releases)\n[![PyPI Version](https://img.shields.io/pypi/v/shtst.svg)](https://pypi.python.org/pypi/shtst)\n[![Python Versions](https://img.shields.io/pypi/pyversions/shtst.svg)](https://pypi.python.org/pypi/shtst)\n[![CI](https://github.com/obfusk/shtst/workflows/CI/badge.svg)](https://github.com/obfusk/shtst/actions?query=workflow%3ACI)\n[![GPLv3+](https://img.shields.io/badge/license-GPLv3+-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)\n\n## shtst - simple cli testing\n\n`shtst` is a command-line tool for testing command-line programs\nagainst a simple specification of their expected output and exit code\ngiven certain options and input.\n\nIt is inspired by (and similar to)\n[shelltestrunner](https://github.com/simonmichael/shelltestrunner).\n\n## Test Specification Format\n\n```bash\n# '#' starts a comment line; blank lines are ignored\n\n# '$' starts a command line\n$ true\n\n# '?' specifies the expected return code [default: 0]\n$ false\n? 1\n\n# '\u003e' starts a stdout specification (which ends at the first line that\n# is either blank or starts with a '#', '$', '?', '\u003c', or '\u003e')\n$ echo foo\n\u003e\nfoo\n\n# '\u003c' starts an input specification (which ends the same way)\n$ cat\n\u003c\nfoo\nbar\n\u003e\nfoo\nbar\n\n# input from the previous command (if any) is reused if not specified\n$ wc -l\n2\n\n# prefixing the input/output lines with '|' allows blank lines and\n# other input/output that would otherwise end the specification (and\n# lines that start with '|')\n$ printf \"foo\\n\\n\u003c\u003e\\n\"\n\u003e\n|foo\n|\n|\u003c\u003e\n\n# instead of literal lines of output, you can provide a regex\n# (delimited by '/' and optionally followed by flags: 'i' for case\n# insensitive, 'm' for multiline, and 's' for dotall) immediately\n# after '\u003e' or '\u003e2'\n$ printf \"Line 1 foo\\nLine 2 bar\\nLine 3 baz\\n\"\n\u003e /^line 1.*^line 2/ims\n\n# use '\u003e2' instead of '\u003e' to specify stderr instead of stdout\n$ cat --oops\n\u003e2 /unrecognized option/\n? 1\n\n# use a '!' before the exit code to negate the test\n$ echo 'does not return 42'\n? !42\n\n# no stdout/stderr specification means anything is accepted;\n# explicitly use an empty specification if necessary\n$ echo OK\n\u003e2\n```\n\nA test case always starts with a command line.  All input/output/exit\ncode specifications belong to the preceding command line.  With one\nexception: you can specify input before the first command, which will\nthen be used for all subsequent commands until the next input\nspecification.\n\n```bash\n\u003c\nfoo\nbar\nbaz\n\n$ cat\n\u003e\nfoo\nbar\nbaz\n\n$ wc -l\n\u003e 3\n```\n\n## Help\n\n```bash\n$ shtst --help\n```\n\n## Tab Completion\n\nNB: the syntax for the environment variable changed in click \u003e= 8.0,\nuse e.g. `source_bash` instead of `bash_source` for older versions.\n\nFor Bash, add this to `~/.bashrc`:\n\n```bash\neval \"$(_SHTST_COMPLETE=bash_source shtst)\"\n```\n\nFor Zsh, add this to `~/.zshrc`:\n\n```zsh\neval \"$(_SHTST_COMPLETE=zsh_source shtst)\"\n```\n\nFor Fish, add this to `~/.config/fish/completions/shtst.fish`:\n\n```fish\neval (env _SHTST_COMPLETE=fish_source shtst)\n```\n\n## Requirements\n\n* Python \u003e= 3.7 + click.\n\n### Debian/Ubuntu\n\n```bash\n$ apt install python3-click\n```\n\n## Installing\n\n### Using pip\n\n```bash\n$ pip install shtst\n```\n\nNB: depending on your system you may need to use e.g. `pip3 --user`\ninstead of just `pip`.\n\n### From git\n\nNB: this installs the latest development version, not the latest\nrelease.\n\n```bash\n$ git clone https://github.com/obfusk/shtst.git\n$ cd shtst\n$ pip install -e .\n```\n\nNB: you may need to add e.g. `~/.local/bin` to your `$PATH` in order\nto run `shtst`.\n\nTo update to the latest development version:\n\n```bash\n$ cd shtst\n$ git pull --rebase\n```\n\n## License\n\n[![GPLv3+](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.html)\n\n\u003c!-- vim: set tw=70 sw=2 sts=2 et fdm=marker : --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobfusk%2Fshtst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobfusk%2Fshtst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobfusk%2Fshtst/lists"}