{"id":18256981,"url":"https://github.com/mediacomem/csrf-bank","last_synced_at":"2025-04-08T22:29:12.314Z","repository":{"id":73832454,"uuid":"452972764","full_name":"MediaComem/csrf-bank","owner":"MediaComem","description":"A demonstration of what could happen when you do not protect your forms with CSRF tokens","archived":false,"fork":false,"pushed_at":"2022-01-28T07:13:57.000Z","size":309,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-14T17:43:29.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MediaComem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-01-28T07:11:51.000Z","updated_at":"2022-01-28T07:12:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"25dce1c6-7966-49ed-a74f-6d0089308872","html_url":"https://github.com/MediaComem/csrf-bank","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fcsrf-bank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fcsrf-bank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fcsrf-bank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Fcsrf-bank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MediaComem","download_url":"https://codeload.github.com/MediaComem/csrf-bank/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247938766,"owners_count":21021588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-05T10:24:23.648Z","updated_at":"2025-04-08T22:29:12.308Z","avatar_url":"https://github.com/MediaComem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Carl Sagan Richard Feynman Bank\n\nAn e-banking web application demonstrating what happens when you do not protect\nyour forms with [Cross-Site Request\nForgery](https://en.wikipedia.org/wiki/Cross-site_request_forgery) tokens.\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Requirements](#requirements)\n- [Development](#development)\n- [Production](#production)\n- [Configuration](#configuration)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Requirements\n\n- [Node.js][node] 16.x\n\n## Development\n\n```bash\n# Clone and move into the repository\ngit clone https://github.com/MediaComem/exploit-csrf-bank.git\ncd exploit-csrf-bank\n\n# Install dependencies\nnpm ci\n\n# Run the application in development mode\nnpm run dev\n```\n\n## Production\n\n```bash\n# Clone and move into the repository\ngit clone https://github.com/MediaComem/exploit-csrf-bank.git\ncd exploit-csrf-bank\n\n# Install dependencies\nnpm install --production\n\n# Run the application in development mode\nBANK_SESSION_SECRET=changeme npm start\n```\n\n## Configuration\n\nThe application can be configured using the following environment variables:\n\n| Variable                | Default value                            | Description                                                          |\n| :---------------------- | :--------------------------------------- | :------------------------------------------------------------------- |\n| `BANK_LISTEN_HOST`      | `0.0.0.0`                                | The IP address to listen to (use `0.0.0.0` for any IP address).      |\n| `BANK_LISTEN_PORT`      | `3000`                                   | The port to listen on.                                               |\n| `BANK_SESSION_SECRET`   | -                                        | Secret used to sign session cookies. Should be a long random string. |\n| `BANK_SESSION_LIFETIME` | `86_400_000` (one day)                   | Lifetime of sessions in milliseconds.                                |\n| `BANK_BCRYPT_ROUNDS`    | `10`                                     | [Bcrypt][bcrypt] algorithm cost factor.                              |\n| `BANK_DB_FILE`          | `db.loki` (relative to the application)  | The file in which the embedded database will be stored.              |\n| `BANK_SESSIONS_DIR`     | `session` (relative to the application)  | The diretory in which session files will be stored.                  |\n| `BANK_TRUST_PROXY`      | `false`                                  | Whether to trust proxy headers.                                      |\n| `BANK_TITLE`            | `Carl Sagan Richard Feynman Bank`        | The title displayed in the navbar.                                   |\n| `BANK_LOG_LEVEL`        | `DEBUG` in production, `TRACE` otherwise | The highest level of log messages to output.                         |\n\n\u003e In development mode, you can also put these settings in a `.env` file in the\n\u003e repository.\n\n[bcrypt]: https://en.wikipedia.org/wiki/Bcrypt\n[node]: https://nodejs.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediacomem%2Fcsrf-bank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmediacomem%2Fcsrf-bank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediacomem%2Fcsrf-bank/lists"}