본문으로 건너뛰기
cccskills
무료GitHub에 공개

testdriver:secrets

Securely manage passwords and sensitive data in your tests

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHub
설치 방법 보기

포함된 파일(1)

  • SKILL.md3.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

<!-- Generated from secrets.mdx. DO NOT EDIT. -->

Protect sensitive information such as passwords, API keys, and tokens in your TestDriver tests.

Typing Secrets Securely

When you type sensitive information such as passwords, use the secret: true option. This stops TestDriver from a log or a store of the value:

import { test } from 'vitest';
import { chrome } from 'testdriverai/presets';

test('login with secure password', async (context) => {
  const { testdriver } = await chrome(context, { 
    url: 'https://myapp.com/login' 
  });

  await testdriver.find('email input').click();
  await testdriver.type(process.env.TD_USERNAME);
  
  await testdriver.find('password input').click();
  // Password is masked in logs and recordings
  await testdriver.type(process.env.TD_PASSWORD, { secret: true });
  
  await testdriver.find('login button').click();
  await testdriver.assert('dashboard is visible');
});
<Note> When you set `secret: true`, the typed text shows as `****` in all logs, recordings, and dashcam output. </Note>

Storing Secrets in GitHub

Store sensitive credentials as GitHub repository secrets. Then they are never in your code:

<Steps> <Step title="Navigate to Repository Settings"> Go to your GitHub repository → **Settings** → **Secrets and variables** → **Actions** </Step> <Step title="Add Repository Secrets"> Click **New repository secret** and add your secrets: - `TD_API_KEY` - Your TestDriver API key - `TD_USERNAME` - Test account username - `TD_PASSWORD` - Test account password </Step> <Step title="Use in GitHub Actions"> Reference secrets in your workflow file: ```yaml .github/workflows/test.yml - name: Run TestDriver tests env: TD_API_KEY: ${{ secrets.TD_API_KEY }} TD_USERNAME: ${{ secrets.TD_USERNAME }} TD_PASSWORD: ${{ secrets.TD_PASSWORD }} run: vitest run ``` </Step> </Steps>

Local Development

For local development, store secrets in a .env file:

TD_API_KEY=your_api_key_here
TD_USERNAME=testuser@example.com
TD_PASSWORD=your_secure_password
<Warning> Never commit `.env` files to version control. Add `.env` to your `.gitignore` file. </Warning>

Complete Example

Here's a full login test with proper secrets handling:

import { test, expect } from 'vitest';
import { chrome } from 'testdriverai/presets';

test('secure login flow', async (context) => {
  const { testdriver } = await chrome(context, { 
    url: process.env.TD_WEBSITE || 'https://staging.myapp.com'
  });

  // Enter username (not sensitive)
  await testdriver.find('email input').click();
  await testdriver.type(process.env.TD_USERNAME);
  
  // Enter password securely
  await testdriver.find('password input').click();
  await testdriver.type(process.env.TD_PASSWORD, { secret: true });
  
  // Submit login
  await testdriver.find('login button').click();
  
  // Verify successful login
  const loggedIn = await testdriver.assert('user is logged in');
  expect(loggedIn).toBeTruthy();
});
<Card title="Secrets Best Practices" icon="shield-check"> - **Always use `secret: true`** when typing passwords, tokens, or sensitive data - **Use environment variables** to keep secrets out of code - **Store secrets in your CI provider** (GitHub Actions, GitLab CI, etc.) - **Never commit secrets** to version control - **Rotate secrets regularly** to maintain security </Card>

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

How the TestDriver agent behaves on GitHub issues, pull requests, and @mentions

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testdriverai/testdriverai4732026년 9월 21일 업데이트

Execute natural language tasks using AI

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testdriverai/testdriverai4732026년 9월 21일 업데이트

Make AI-powered assertions about screen state

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testdriverai/testdriverai4732026년 9월 21일 업데이트

Deploy TestDriver on your AWS infrastructure using CloudFormation

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testdriverai/testdriverai4732026년 9월 21일 업데이트

Speed up tests with screenshot-based caching

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testdriverai/testdriverai4732026년 9월 21일 업데이트

How TestDriver learns your app and caches what it discovers for instant, deterministic replays

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

testdriverai/testdriverai4732026년 9월 21일 업데이트

testdriverai의 스킬 모두 보기

이 스킬의 문제 신고