Software factory / Issues
Spam and bans
Spam accounts open issues and pull requests faster than you can close them. You want the spam closed, the worst accounts banned, a say on the other bans, and a fast undo for a wrong ban.
3 min read
When an admin turns it on, the spam agent reads each new issue and pull request. Its model says only if the content is spam. Code then decides what to do, from that verdict, the audit verdict, and numbers about the account from the whole forge. The model never bans.
The spam agent is off by default. You need admin access to the repository.
1. Turn on the spam agent, and pick a ban policy
- Open Agents. In the sidebar, click Agents under Software factory.
- Turn on the switch of Spam. It saves at once.
- In the sidebar, click Rules under Software factory, and pick a Ban policy.
- Pick where A ban applies to: The repository only, or Every repository of the owner.
- Click Save rules.
| Ban policy | The bot bans when | Otherwise, for spam content |
|---|---|---|
| Ban only on hard proof | There is hard proof. | It closes the item. With a soft signal, it suggests a ban. |
| Never ban, only suggest | Never. | It closes the item. With hard proof or a soft signal, it suggests a ban. |
| Ban on weaker proof too | There is hard proof, or the content is spam and the account has 2 or more soft signals. | It closes the item. With 1 soft signal, it suggests a ban. |
The soft signals are:
- The account is less than 7 days old.
- It opened issues and pull requests in 3 or more repositories in the last 6 hours.
- Screening rejected 3 or more of its issues and pull requests.
Tip
An organization owner can turn on the spam agent and set the policy for all repositories of the organization, on the organization's Software factory tab.
Done
The bot closes spam, and bans an account only on the proof that your policy asks for. It suggests the other bans to you on the Suggested tab of the Bans page. Manage bans and appeals shows how to decide on them, and how to lift a wrong ban.
What the bot does by default
The default ban policy is Ban only on hard proof. A ban holds in this repository only.
- Hard proof: the audit found the pull request malicious. Or the account has 3 or more bans on the forge, and posts in a burst right now. The bot closes the item and bans the author.
- Spam content, no hard proof: the bot closes the item. It does not ban. If the account also has a soft signal, the bot adds a suggested ban to the Bans page, and you decide.
- No spam: the bot does nothing.
When the bot closes an item, it adds the label spam and posts one comment. For example: "The bot closed this issue as spam, and banned its author from acme/app. An admin of acme/app can lift the ban. A maintainer can reopen it."
The comment names no signal and no suggested ban. The numbers about the account are for the admins, on the Bans page.