contract-testing-patterns — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited contract-testing-patterns (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
const { PactV3, MatchersV3 } = require('@pact-foundation/pact');
const { like, eachLike, string, integer } = MatchersV3;
const provider = new PactV3({
consumer: 'OrderService',
provider: 'UserService',
logLevel: 'warn',
});
describe('User API Contract', () => {
it('returns user by ID', async () => {
await provider
.given('user with ID 1 exists')
.uponReceiving('a request for user 1')
.withRequest({
method: 'GET',
path: '/api/users/1',
headers: { Accept: 'application/json' },
})
.willRespondWith({
status: 200,
headers: { 'Content-Type': 'application/json' },
body: {
id: integer(1),
name: string('Jane Doe'),
email: string('[email protected]'),
roles: eachLike('admin'),
},
})
.executeTest(async (mockServer) => {
const client = new UserClient(mockServer.url);
const user = await client.getUser(1);
expect(user.id).toBe(1);
expect(user.name).toBeDefined();
});
});
});const { Verifier } = require('@pact-foundation/pact');
describe('User Provider Verification', () => {
it('validates consumer contracts', async () => {
const verifier = new Verifier({
providerBaseUrl: 'http://localhost:3000',
pactBrokerUrl: process.env.PACT_BROKER_URL,
pactBrokerToken: process.env.PACT_BROKER_TOKEN,
provider: 'UserService',
providerVersion: process.env.GIT_SHA,
providerVersionBranch: process.env.GIT_BRANCH,
publishVerificationResult: true,
stateHandlers: {
'user with ID 1 exists': async () => {
await db.users.create({ id: 1, name: 'Jane Doe', email: '[email protected]' });
},
'no users exist': async () => {
await db.users.deleteAll();
},
},
});
await verifier.verifyProvider();
});
});# Backward Compatible (SAFE):
- Adding optional fields
- Adding new endpoints
- Widening accepted value ranges
- Adding new enum values (if consumer ignores unknown)
# Breaking Changes (UNSAFE):
- Removing fields
- Renaming fields
- Changing field types
- Making optional fields required
- Narrowing accepted value ranges
- Removing endpoints# Before deploying consumer
pact-broker can-i-deploy \
--pacticipant OrderService \
--version $GIT_SHA \
--to-environment production
# Before deploying provider
pact-broker can-i-deploy \
--pacticipant UserService \
--version $GIT_SHA \
--to-environment productioncan-i-deploy gate in CI pipeline before deploycan-i-deploy failures~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.