Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- A guard now keeps literal credentials out of the tests, and every credential the tests generate is named with a single-word purpose, so secret scanning has nothing to report. `laranail/package-tools` in `require-dev` is now `^0.1.10`, the first release with the purpose check.

## [0.1.7] - 2026-10-13

### Added
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"rector/rector": "^2.5.8",
"roave/security-advisories": "dev-latest",
"symfony/tui": "^8.2@dev",
"laranail/package-tools": "^0.1"
"laranail/package-tools": "^0.1.10"
},
"suggest": {
"laranail/emojis": "The full Unicode emoji catalogue: Console::emoji() resolves every shortcode, not just its built-in map, and DisplayWidth measures ZWJ/flag/skin-tone sequences as two columns.",
Expand Down
27 changes: 27 additions & 0 deletions tests/Tools/Architecture/NoLiteralCredentialsTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace Simtabi\Laranail\Console\Tools\Tests\Architecture;

use PHPUnit\Framework\TestCase;
use Simtabi\Laranail\Package\Tools\Testing\AssertsNoLiteralCredentials;

/**
* Secret scanning cannot tell a test password from a leaked one, and reports both. Tests take
* their credentials from TestCredentials at run time; this fails on any literal left behind.
*/
final class NoLiteralCredentialsTest extends TestCase
{
use AssertsNoLiteralCredentials;

public function test_the_tests_hold_no_literal_credentials(): void
{
$this->assertNoLiteralCredentialsIn([dirname(__DIR__, 2)], minFiles: 82);
}

public function test_every_generated_credential_is_named_with_a_single_word(): void
{
$this->assertCredentialPurposesAreWordsIn([dirname(__DIR__, 2)], minFiles: 82);
}
}
Loading