{"id":20718639,"url":"https://github.com/os2web/os2web_audit","last_synced_at":"2026-03-09T01:34:07.471Z","repository":{"id":236043328,"uuid":"791726316","full_name":"OS2web/os2web_audit","owner":"OS2web","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-29T08:56:33.000Z","size":224,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2026-01-15T13:41:40.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/OS2web.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-25T08:52:19.000Z","updated_at":"2025-10-29T08:56:35.000Z","dependencies_parsed_at":"2025-02-17T12:26:41.832Z","dependency_job_id":"98b8c6c6-aa7c-4d0e-997e-e8b1027e2a84","html_url":"https://github.com/OS2web/os2web_audit","commit_stats":null,"previous_names":["os2web/os2web_audit"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/OS2web/os2web_audit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OS2web%2Fos2web_audit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OS2web%2Fos2web_audit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OS2web%2Fos2web_audit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OS2web%2Fos2web_audit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OS2web","download_url":"https://codeload.github.com/OS2web/os2web_audit/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OS2web%2Fos2web_audit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30279777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":"2024-11-17T03:14:20.120Z","updated_at":"2026-03-09T01:34:07.412Z","avatar_url":"https://github.com/OS2web.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OS2Web Audit\n\nThis audit module can be used to track changes and perform audit logging on\ndrupal sites.\n\n## Features\n\nThis module includes three plugins that facilitate logging information to Loki,\nfiles, or to the database through Drupal's watchdog logger.\n\nThese logging providers are designed using Drupal's plugin APIs. Consequently,\nit opens up possibilities for creating new AuditLogger plugins within other\nmodules, thus enhancing the functionality of this audit logging.\n\nFor performance purposes we use a queue system. This avoids hindering\nperformance more than necessary as the actual logging is done async. Furthermore,\nthis allows for retries in case any audit log plugins should fail.\n\n## Installation\n\nEnable the module and go to the modules setting page at\n`/admin/config/os2web_audit/settings/`.\n\n```shell\ncomposer require os2web/os2web_audit\ndrush pm:enable os2web_audit\n```\n\n## Drush\n\n### Test audit log\n\nThe module provides a Drush command named audit:log. This command enables you\nto log a test message to the configured logger. The audit:log command accepts a\nstring that represents the message to be logged.\n\nThe message provided, will be logged twice, once as an informational message\nand once as an error message.\n\n```shell\ndrush audit:log 'This is a test message'\n```\n\n### Retry jobs\n\nThe module also comes with methods for retrying failed jobs in the\n`os2web_audit` queue.\n\n```shell\ndrush audit:retry-failed-jobs\n```\n\nPer default, it simply retries all failed jobs however it comes with\nthe following options:\n\n```shell\n --id[=ID]       Retry a specific job by ID (e.g. 1245.)\n --ignore-state  Retry job regardless of state. This only effects the --id option.\n --limit[=LIMIT] Retry (up to) a limited number of jobs. Minimum: 1, Maximum: 5000, Default 1000.\n```\n\n## Usage\n\nThe module exposes a simple `Logger` service which can log an `info` and `error`\nmessages.\n\nInject the logger service named `os2web_audit.logger` and send messages into the\nlogger as shown below:\n\n```php\n$msg = sprintf('Fetch personal data from service with parameter: %s', $param);\n$this-\u003eauditLogger-\u003einfo('Lookup', $msg);\n```\n\n### Queue\n\nThe actual logging is handled by jobs in an [Advanced\nQueue](https://www.drupal.org/project/advancedqueue) queue.\n\nThe queue, OS2Web audit (`os2web_audit`), must be\nprocessed by a server `cron` job, e.g.\n\n```sh\ndrush advancedqueue:queue:process os2web_audit\n```\n\nList the queue (and all other queues) with\n\n```sh\ndrush advancedqueue:queue:list\n```\n\nor go to `/admin/config/system/queues/jobs/os2web_audit` for a\ngraphical overview of jobs in the queue.\n\n### Coding standards\n\n#### PHP files (PHP_CodeSniffer)\n\nCheck PHP coding standards\n\n```shell\ndocker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer install\ndocker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-check\n```\n\nApply coding standard changes\n\n```shell\ndocker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer install\ndocker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-apply\n```\n\n### Code analysis\n\nphpstan is used to perform static analysis of the code. Run the following script:\n\n```sh\n./scripts/code-analysis\n```\n\n#### Markdown files\n\n```shell\ndocker run --interactive --rm --volume \"$PWD:/md\" itkdev/markdownlint markdownlint '**/*.md' --fix\ndocker run --interactive --rm --volume \"$PWD:/md\" itkdev/markdownlint markdownlint '**/*.md'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fos2web%2Fos2web_audit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fos2web%2Fos2web_audit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fos2web%2Fos2web_audit/lists"}