{"id":16931073,"url":"https://github.com/issif/twitter-plugin","last_synced_at":"2025-08-02T08:08:24.943Z","repository":{"id":64308282,"uuid":"460910274","full_name":"Issif/twitter-plugin","owner":"Issif","description":"Falco Plugin for Twitter Stream","archived":false,"fork":false,"pushed_at":"2022-10-03T18:09:16.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T18:41:13.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/Issif.png","metadata":{"files":{"readme":"README.md","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":"2022-02-18T15:43:38.000Z","updated_at":"2022-03-17T16:02:27.000Z","dependencies_parsed_at":"2023-01-15T11:15:22.762Z","dependency_job_id":null,"html_url":"https://github.com/Issif/twitter-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Issif/twitter-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Ftwitter-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Ftwitter-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Ftwitter-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Ftwitter-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Issif","download_url":"https://codeload.github.com/Issif/twitter-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Issif%2Ftwitter-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268351462,"owners_count":24236411,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":"2024-10-13T20:43:10.210Z","updated_at":"2025-08-02T08:08:24.919Z","avatar_url":"https://github.com/Issif.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter Plugin\n\nThis repository contains the `twittter` plugin for `Falco`, which follows a stream filtered by rules. See [twitter developper guide for details](https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule).\n\nThe plugin also exports fields that extract information from a `twitter` tweet, such as the author name, the lang, the content of the tweet, ...\n\n- [Twitter Plugin](#twitter-plugin)\n- [Event Source](#event-source)\n- [Supported Fields](#supported-fields)\n- [Development](#development)\n  - [Requirements](#requirements)\n  - [Build](#build)\n- [Environment variables](#environment-variables)\n- [Settings](#settings)\n- [Configurations](#configurations)\n- [Usage](#usage)\n  - [Requirements](#requirements-1)\n  - [Results](#results)\n\n# Event Source\n\nThe event source for `twitter` events is `twitter`.\n\n# Supported Fields\n\n| Name                     | Type   | Description                        |\n| ------------------------ | ------ | ---------------------------------- |\n| `twitter.text`           | string | Text of Tweet                      |\n| `twitter.rawtext`        | string | Text of Tweet without return lines |\n| `twitter.authorname`     | string | Author Name of the Tweet           |\n| `twitter.authorusername` | string | Author Username of the Tweet       |\n| `twitter.lang`           | string | Lang of the Tweet                  |\n| `twitter.isrt`           | string | `true` if the Tweet is a retweet   |\n\n# Development\n## Requirements\n\nYou need:\n* `Go` \u003e= 1.17\n\n## Build\n\n```shell\nmake\n```\n\n# Environment variables\n\nThe plugin needs to authenticate to Twitter API, you need to export:\n* `TWITTER_API_KEY`: your API key for Twitter API\n* `TWITTER_API_SECRET`: you API Secret Twitter API \n\n# Settings\n\nOnly `init_config` accepts settings:\n* `flushinterval`: time en ms between two flushes of events from `twitter` to `Falco` (default: 1000ms)\n* `rules`: list of rules for filtering the stream, see [twitter developper guide for details](https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule)\n\n# Configurations\n\n* `falco.yaml`\n\n  ```yaml\n  plugins:\n    - name: twitter\n      library_path: /etc/falco/audit/libtwitter.so\n      init_config:\n        rules:\n          - cat has:images\n          - dog has:images\n        flushinterval: 1000\n      open_params: ''\n\n  load_plugins: [twitter]\n\n  stdout_output:\n    enabled: true\n  ```\n\n* `rules/twitter_rules.yaml`\n\nThe `source` for rules must be `twitter`.\n\nSee example:\n```yaml\n- rule: New Cat image Tweet\n  desc: New Cat image Tweet\n  condition: twitter.text contains cat \n  output: \"New CAT image tweet from @%twitter.authorname: %twitter.rawtext\"\n  priority: DEBUG\n  source: twitter\n  tags: [twitter]\n- rule: New Dog image Tweet\n  desc: New Dog image Tweet\n  condition: twitter.text contains dog \n  output: \"New DOG image tweet from @%twitter.authorname: %twitter.rawtext\"\n  priority: DEBUG\n  source: twitter\n  tags: [twitter]\n```\n\n# Usage\n\n```shell\nfalco -c falco.yaml -r rules/twitter_rules.yaml\n```\n\n## Requirements\n\n* `Falco` \u003e= 0.32\n\n## Results\n\n```shell\n14:30:56.334904000: Debug New DOG image tweet from @Kate: Me letting my dog out for a wee #StormEunice https://t.co/f9pfR4jQAe\n14:30:57.336734000: Debug New CAT image tweet from @いづも〜アリエナイ〜: めっちゃ見るじゃん。 #チャーリーとチョコレート工場  #猫  #cat #猫のいる暮らし #猫のいる生活 https://t.co/mDBJYyEdb1\n14:30:57.337896000: Debug New CAT image tweet from @dimension: dan: RT @heeseungable: jake cat n' dog stuff toy 🐕🐈 ! https://t.co/tV9pBL3xqn\n14:30:57.338709000: Debug New CAT image tweet from @imdone: RT @cat_dot_exe: https://t.co/0Fy60CUtYc\n14:30:58.339475000: Debug New CAT image tweet from @SAMANTHA CFO: ▶️ ¡ÚLTIMOS DÍAS!🗳 VOTA a SAMANTHA con \"Ja no fa mal\" en la categoría \"Millor cançó de pop-rock\". en los premios @enderrock. https://t.co/iB2mQd33BZ https://t.co/s0A772eNe0\n14:30:58.340175000: Debug New CAT image tweet from @MawarCrypto: RT @TaylorMusk7: My brother has a cat and I hope his Babycat will grow up soon！Babycat😍 https://t.co/eyQ4VyJ2kR\n14:30:59.342610000: Debug New CAT image tweet from @クロネネコ: RT @okirakuoki: おっぴろげ。#cat #ねこ #猫 https://t.co/Kz18EboQ7r\n14:30:59.343185000: Debug New CAT image tweet from @Anton: RT @cat_dot_exe: https://t.co/0Fy60CUtYc\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissif%2Ftwitter-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fissif%2Ftwitter-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fissif%2Ftwitter-plugin/lists"}