PHPackages                             tegic/security - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. tegic/security

ActiveLibrary[Security](/categories/security)

tegic/security
==============

security package for PHP

v2.0.1(1y ago)0101MITPHPPHP ^8.0

Since Jul 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/teg1c/security)[ Packagist](https://packagist.org/packages/tegic/security)[ RSS](/packages/tegic-security/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

阿里云绿网内容审核/腾讯云内容审核
=================

[](#阿里云绿网内容审核腾讯云内容审核)

运行环境
----

[](#运行环境)

- php &gt;= 8.0
- composer

安装
--

[](#安装)

```
composer require tegic/security
```

说明
--

[](#说明)

### 使用

[](#使用)

```
$config = [
    'access_key_id' => 'LTAI5tE***********',
    'access_key_secret' => 'ybdyNZ69kU7dRA***********',
    'region_id' => 'cn-shanghai',
    'endpoint' => 'green-cip.cn-shanghai.aliyuncs.com'
];

try {
    //普通方式调用 传入配置
    $client = Security::instance('ali', $config);
    $client->setOption([
        'service' => 'ugc_moderation_byllm'
    ]);****
    //hyperf 调用 默认使用配置文件
//    $client = \Tegic\Security\Security::instance('tencent');
    $result = $client->text('测试');// true 为内容通过
    var_dump($result ?? '');
} catch (\Tegic\Security\Exception\ContentErrorException $exception) {
    //内容审核不通过，$exception->getData() 可以获取 sdk 返回的内容
    var_dump("不通过", $exception->getData());
} catch (\Tegic\Security\Exception\SecurityException $securityException) {
    //系统错误，如 配置不正确等等..
    var_dump("系统错误", $securityException->getMessage());
}
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance49

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~475 days

Total

4

Last Release

375d ago

Major Versions

v1.0.1 → v2.0.02025-05-08

PHP version history (2 changes)v1.0.0PHP ^7.3

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27796058?v=4)[tegic](/maintainers/teg1c)[@teg1c](https://github.com/teg1c)

---

Top Contributors

[![teg1c](https://avatars.githubusercontent.com/u/27796058?v=4)](https://github.com/teg1c "teg1c (3 commits)")

### Embed Badge

![Health badge](/badges/tegic-security/health.svg)

```
[![Health](https://phpackages.com/badges/tegic-security/health.svg)](https://phpackages.com/packages/tegic-security)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.7M143](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)[overtrue/laravel-qcloud-federation-token

QCloud COS FederationToken generator for Laravel.

179.5k](/packages/overtrue-laravel-qcloud-federation-token)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
