{"id":37026390,"url":"https://github.com/steinarb/post-body-capture","last_synced_at":"2026-01-14T03:04:13.751Z","repository":{"id":57738147,"uuid":"111278890","full_name":"steinarb/post-body-capture","owner":"steinarb","description":"A servlet to capture POST bodies into files","archived":false,"fork":false,"pushed_at":"2020-10-13T15:05:37.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-25T01:24:13.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steinarb.png","metadata":{"files":{"readme":"README.org","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":"2017-11-19T08:49:35.000Z","updated_at":"2020-10-13T15:05:25.000Z","dependencies_parsed_at":"2022-08-25T20:41:55.346Z","dependency_job_id":null,"html_url":"https://github.com/steinarb/post-body-capture","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/steinarb/post-body-capture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fpost-body-capture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fpost-body-capture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fpost-body-capture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fpost-body-capture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steinarb","download_url":"https://codeload.github.com/steinarb/post-body-capture/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinarb%2Fpost-body-capture/sbom","scorecard":{"id":850909,"data":{"date":"2025-08-11","repo":{"name":"github.com/steinarb/post-body-capture","commit":"bd2fbc46717e29c38703cba72877a2e0933c82c6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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/23 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":"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":"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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 1 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":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"}}]},"last_synced_at":"2025-08-23T22:30:42.188Z","repository_id":57738147,"created_at":"2025-08-23T22:30:42.189Z","updated_at":"2025-08-23T22:30:42.189Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-14T03:04:13.112Z","updated_at":"2026-01-14T03:04:13.733Z","avatar_url":"https://github.com/steinarb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"* A servlet to capture POST bodies into files\n\nI needed something that could capture POST bodies so that I could use real POST bodies in unit tests (specifically: I needed some examples of [[https://docs.sonarqube.org/display/SONAR/Webhooks][Sonar Webhooks]] for my [[https://github.com/steinarb/sonar-collector][sonar-collector]] utility).\n\nThe solution was this servlet:\n 1. The servlet installs into an [[http://karaf.apache.org][apache karaf]] instance\n 2. All POST bodies are written to a temp file, and the file name is written to the log as an INFO message. Example log message:\n    #+BEGIN_EXAMPLE\n      [INFO] Saved body of POST to http://localhost:8181/post-body-capture to file: /tmp/postbodycaptureservlet628424040798817132.json\n    #+END_EXAMPLE\n\n/Note:/ The temp files aren't cleaned up by the servlet or when uninstalling the servlet, so leaving this servlet running can create a lot of clutter in the temp directory.\n\nNote also, that this servlet is written to be installed as a [[https://karaf.apache.org/manual/latest/#_feature_and_resolver][karaf feature]] in [[http://karaf.apache.org][Apache Karaf]] and connect to the [[http://ops4j.github.io/pax/web/SNAPSHOT/User-Guide.html#whiteboard-extender][Pax Web Whiteboard Extender]].\n\nBut outside of OSGi, Pax Web and Karaf, this is just a plain servlet with no special dependencies, and can presumably be used everywhere such a servlet can be used. I haven't tried this myself, however.\n\n** Status\n\n[[https://travis-ci.org/steinarb/post-body-capture][file:https://travis-ci.org/steinarb/post-body-capture.svg?branch=master]] [[https://coveralls.io/r/steinarb/post-body-capture][file:https://coveralls.io/repos/steinarb/post-body-capture/badge.svg]] [[https://sonarcloud.io/dashboard/index/no.priv.bang.debug-utils%3Apost-body-capture][file:https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.debug-utils%3Apost-body-capture\u0026metric=alert_status#.svg]] [[https://maven-badges.herokuapp.com/maven-central/no.priv.bang.debug-utils/post-body-capture][file:https://maven-badges.herokuapp.com/maven-central/no.priv.bang.debug-utils/post-body-capture/badge.svg]]\n\n\n*** SonarCloud\n\n[[https://sonarcloud.io/dashboard/index/no.priv.bang.debug-utils%3Apost-body-capture][file:https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.debug-utils%3Apost-body-capture\u0026metric=ncloc#.svg]] [[https://sonarcloud.io/dashboard/index/no.priv.bang.debug-utils%3Apost-body-capture][file:https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.debug-utils%3Apost-body-capture\u0026metric=bugs#.svg]] [[https://sonarcloud.io/dashboard/index/no.priv.bang.debug-utils%3Apost-body-capture][file:https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.debug-utils%3Apost-body-capture\u0026metric=vulnerabilities#.svg]] [[https://sonarcloud.io/dashboard/index/no.priv.bang.debug-utils%3Apost-body-capture][file:https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.debug-utils%3Apost-body-capture\u0026metric=code_smells#.svg]] [[https://sonarcloud.io/dashboard/index/no.priv.bang.debug-utils%3Apost-body-capture][file:https://sonarcloud.io/api/project_badges/measure?project=no.priv.bang.debug-utils%3Apost-body-capture\u0026metric=coverage#.svg]]\n\n\n** How to install\n\nThis is how to build and install the servlet:\n 1. First [[https://karaf.apache.org/manual/latest/quick-start.html#_quick_start][download and install apache karaf]]\n 2. In the apache karaf command line, install the feature that pulls in the servlet with dependencies\n    #+BEGIN_EXAMPLE\n      feature:repo-add mvn:no.priv.bang.debug-utils/post-body-capture/LATEST/xml/features\n      feature:install post-body-capture\n    #+END_EXAMPLE\n 3. After this, the servlet will be listening for POST requests, at the local path \"/post-body-capture\" on the karaf web server, e.g. http://localhost:8181/post-body-capture for a karaf server started locally, with default settings\n\n** To uninstall the servlet from karaf\n\nThis is how to uninstall the servlet from karaf:\n 1. At the karaf console prompt, give the following command:\n    #+BEGIN_EXAMPLE\n      feature:uninstall post-body-capture\n    #+END_EXAMPLE\n\nThis will disconnect the servlet from the Pax Web Whiteboard Extender and uninstall the servlet, and all dependencies (e.g. Pax Web) that has been pulled in by this feature.\n\nHowever, if a different feature has pulled in the same dependencies, the dependencies won't be uninstalled until everything that has required them is uninstalled.\n\n** License\n\nThis software project is licensed under Apache License v. 2.\n\nSee the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinarb%2Fpost-body-capture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteinarb%2Fpost-body-capture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinarb%2Fpost-body-capture/lists"}