lindy-data-handling
Lindy AIでのデータ取り扱いのベストプラクティス。 機密データの管理、データプライバシーの実装、またはデータコンプライアンスの確保が必要な場合に活用できます。 「lindy data」「lindy privacy」「lindy PII」「lindy data handling」「lindy GDPR」といったフレーズでトリガーします。
description の原文を見る
Best practices for handling data with Lindy AI. Use when managing sensitive data, implementing data privacy, or ensuring data compliance. Trigger with phrases like "lindy data", "lindy privacy", "lindy PII", "lindy data handling", "lindy GDPR".
SKILL.md 本文
Lindy データハンドリング
概要
Lindy AIで安全かつコンプライアンス対応のデータハンドリングを行うためのベストプラクティスです。
前提条件
- データプライバシー要件の理解
- 適用される規制の知識(GDPR、CCPA、HIPAA)
- データ分類ドキュメントへのアクセス
手順
ステップ1: データ分類
// data/classification.ts
enum DataClassification {
PUBLIC = 'public',
INTERNAL = 'internal',
CONFIDENTIAL = 'confidential',
RESTRICTED = 'restricted', // PII, PHI, etc.
}
interface DataPolicy {
classification: DataClassification;
canSendToLindy: boolean;
requiresRedaction: boolean;
retentionDays: number;
}
const policies: Record<DataClassification, DataPolicy> = {
[DataClassification.PUBLIC]: {
classification: DataClassification.PUBLIC,
canSendToLindy: true,
requiresRedaction: false,
retentionDays: 365,
},
[DataClassification.INTERNAL]: {
classification: DataClassification.INTERNAL,
canSendToLindy: true,
requiresRedaction: false,
retentionDays: 90,
},
[DataClassification.CONFIDENTIAL]: {
classification: DataClassification.CONFIDENTIAL,
canSendToLindy: true,
requiresRedaction: true,
retentionDays: 30,
},
[DataClassification.RESTRICTED]: {
classification: DataClassification.RESTRICTED,
canSendToLindy: false,
requiresRedaction: true,
retentionDays: 7,
},
};
ステップ2: PII検出と編集
// data/pii-redactor.ts
interface PIIPattern {
name: string;
pattern: RegExp;
replacement: string;
}
const piiPatterns: PIIPattern[] = [
{
name: 'email',
pattern: /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,
replacement: '[EMAIL REDACTED]',
},
{
name: 'phone',
pattern: /(\+\d{1,3}[-.]?)?\(?\d{3}\)?[-.]?\d{3}[-.]?\d{4}/g,
replacement: '[PHONE REDACTED]',
},
{
name: 'ssn',
pattern: /\d{3}-\d{2}-\d{4}/g,
replacement: '[SSN REDACTED]',
},
{
name: 'credit_card',
pattern: /\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/g,
replacement: '[CREDIT CARD REDACTED]',
},
{
name: 'ip_address',
pattern: /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/g,
replacement: '[IP REDACTED]',
},
];
export function redactPII(text: string): { redacted: string; found: string[] } {
let redacted = text;
const found: string[] = [];
for (const pattern of piiPatterns) {
const matches = text.match(pattern.pattern);
if (matches) {
found.push(pattern.name);
redacted = redacted.replace(pattern.pattern, pattern.replacement);
}
}
return { redacted, found };
}
ステップ3: セキュアなデータパイプライン
// lib/secure-lindy.ts
import { Lindy } from '@lindy-ai/sdk';
import { redactPII } from '../data/pii-redactor';
export class SecureLindy {
private lindy: Lindy;
constructor() {
this.lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });
}
async runSecure(agentId: string, input: string, options: {
classification: DataClassification;
redactPII?: boolean;
}) {
// Check if data can be sent to Lindy
const policy = policies[options.classification];
if (!policy.canSendToLindy) {
throw new Error(`Data classification ${options.classification} cannot be sent to Lindy`);
}
// Redact PII if required
let processedInput = input;
let redactionLog: string[] = [];
if (policy.requiresRedaction || options.redactPII) {
const result = redactPII(input);
processedInput = result.redacted;
redactionLog = result.found;
if (redactionLog.length > 0) {
console.log('PII redacted:', redactionLog);
}
}
// Run agent
const result = await this.lindy.agents.run(agentId, { input: processedInput });
// Log for compliance
await this.logDataAccess({
agentId,
classification: options.classification,
piiRedacted: redactionLog,
timestamp: new Date(),
});
return result;
}
private async logDataAccess(log: any): Promise<void> {
// Store audit log
console.log('Data access log:', JSON.stringify(log));
}
}
ステップ4: データ保持管理
// data/retention.ts
import { Lindy } from '@lindy-ai/sdk';
interface RetentionPolicy {
maxAgeDays: number;
autoDelete: boolean;
}
async function enforceRetention(policy: RetentionPolicy) {
const lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });
const cutoffDate = new Date();
cutoffDate.setDate(cutoffDate.getDate() - policy.maxAgeDays);
// Get old runs
const runs = await lindy.runs.list({
before: cutoffDate.toISOString(),
});
console.log(`Found ${runs.length} runs older than ${policy.maxAgeDays} days`);
if (policy.autoDelete) {
for (const run of runs) {
await lindy.runs.delete(run.id);
console.log(`Deleted run: ${run.id}`);
}
}
}
ステップ5: GDPR対応
// compliance/gdpr.ts
import { Lindy } from '@lindy-ai/sdk';
class GDPRHandler {
private lindy: Lindy;
constructor() {
this.lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });
}
// Right to Access
async exportUserData(userId: string): Promise<any> {
const runs = await this.lindy.runs.list({ userId });
const agents = await this.lindy.agents.list({ userId });
return {
exportDate: new Date().toISOString(),
userId,
runs: runs.map(r => ({
id: r.id,
agentId: r.agentId,
createdAt: r.createdAt,
// Don't include input/output for security
})),
agents: agents.map(a => ({
id: a.id,
name: a.name,
createdAt: a.createdAt,
})),
};
}
// Right to Erasure
async deleteUserData(userId: string): Promise<void> {
// Delete all runs
const runs = await this.lindy.runs.list({ userId });
for (const run of runs) {
await this.lindy.runs.delete(run.id);
}
// Delete all agents
const agents = await this.lindy.agents.list({ userId });
for (const agent of agents) {
await this.lindy.agents.delete(agent.id);
}
console.log(`Deleted all data for user: ${userId}`);
}
}
データハンドリング チェックリスト
[ ] データ分類スキームが定義されている
[ ] PII検出が実装されている
[ ] Lindyに送信する前に編集が適用されている
[ ] 監査ログが有効化されている
[ ] 保持ポリシーが定義されている
[ ] GDPR/CCPA対応ハンドラーが実装されている
[ ] データアクセス制御が構成されている
[ ] 転送中の暗号化(HTTPS)が有効
[ ] 定期的なデータ監査がスケジュール設定されている
出力
- データ分類システム
- PII検出と編集
- セキュアなデータパイプライン
- 保持管理
- GDPR対応ハンドラー
エラーハンドリング
| 問題 | 原因 | 解決策 |
|---|---|---|
| PII漏洩 | 編集の欠落 | 自動編集を有効化 |
| 保持期限超過 | クリーンアップなし | 保持ジョブをスケジュール設定 |
| 分類欠落 | ポリシーなし | デフォルトで制限に設定 |
リソース
次のステップ
アクセス制御については lindy-enterprise-rbac に進んでください。
ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ
詳細情報
- 作者
- Brmbobo
- リポジトリ
- Brmbobo/Web2podcast
- ライセンス
- MIT
- 最終更新
- 2026/1/26
Source: https://github.com/Brmbobo/Web2podcast / ライセンス: MIT
関連スキル
secure-code-guardian
認証・認可の実装、ユーザー入力の保護、OWASP Top 10の脆弱性対策が必要な場合に使用します。bcrypt/argon2によるパスワードハッシング、パラメータ化ステートメントによるSQLインジェクション対策、CORS/CSPヘッダーの設定、Zodによる入力検証、JWTトークンの構築などのカスタムセキュリティ実装に対応します。認証、認可、入力検証、暗号化、OWASP Top 10対策、セッション管理、セキュリティ強化全般で活用できます。ただし、構築済みのOAuth/SSO統合や単独のセキュリティ監査が必要な場合は、より特化したスキルの検討をお勧めします。
claude-authenticity
APIエンドポイントが本物のClaudeによって支えられているか(ラッパーやプロキシ、偽装ではないか)を、claude-verifyプロジェクトを模した9つの重み付きルールベースチェックで検証できます。また、Claudeの正体を上書きしているプロバイダーから注入されたシステムプロンプトも抽出します。完全に自己完結しており、httpx以外の追加パッケージは不要です。Claude APIキーまたはエンドポイントを検証したい場合、サードパーティのClaudeサービスが本物か確認したい場合、APIプロバイダーのClaude正当性を監査したい場合、複数モデルを並行してテストしたい場合、またはプロバイダーが注入したシステムプロンプトを特定したい場合に使用できます。
anth-security-basics
Anthropic Claude APIのセキュリティベストプラクティスを適用し、キー管理、入力値の検証、プロンプトインジェクション対策を実施します。APIキーの保護、Claudeに送信する前のユーザー入力検証、コンテンツセーフティガードレールの実装が必要な場合に活用できます。「anthropic security」「claude api key security」「secure anthropic」「prompt injection defense」といったフレーズでトリガーされます。
x-ray
x-ray.mdプレ監査レポートを生成します。概要、強化された脅威モデル(プロトコルタイプのプロファイリング、Gitの重み付け攻撃面分析、時間軸リスク分析、コンポーザビリティ依存関係マッピング)、不変条件、統合、ドキュメント品質、テスト分析、開発者・Gitの履歴をカバーしています。「x-ray」「audit readiness」「readiness report」「pre-audit report」「prep this protocol」「protocol prep」「summarize this protocol」のキーワードで実行されます。
semgrep
Semgrepスタティック分析スキャンを実行し、カスタム検出ルールを作成します。Semgrepでのコードスキャン、セキュリティ脆弱性の検出、カスタムYAMLルールの作成、または特定のバグパターンの検出が必要な場合に使用します。重要:ユーザーが「バグをスキャンしたい」「コード品質を確認したい」「脆弱性を見つけたい」「スタティック分析」「セキュリティlint」「コード監査」または「コーディング標準を適用したい」と尋ねた場合も、Semgrepという名称を明記していなくても、このスキルを使用してください。Semgrepは30以上の言語に対応したパターンベースのコードスキャンに最適なツールです。
ghost-bits-cast-attack
Java「ゴーストビッツ」/キャストアタック プレイブック(Black Hat Asia 2026)。16ビット文字が8ビットバイトに暗黙的に縮小されるJavaサービスへの攻撃時に使用します。WAF/IDSを回避して、SQLインジェクション、デシリアライゼーション型RCE、ファイルアップロード(Webシェル)、パストトラバーサル、CRLF インジェクション、リクエストスマグリング、SMTPインジェクションを実行できます。Tomcat、Spring、Jetty、Undertow、Vert.x、Jackson、Fastjson、Apache Commons BCEL、Apache HttpClient、Angus Mail、JDK HttpServer、Lettuce、Jodd、XMLWriterに影響し、WAFバイパスにより多くの「パッチ済み」CVEを再度有効化します。