Commit graph

487 commits

Author SHA1 Message Date
2bfd52313d
Remove redundant output line from .goreleaser.yaml
The .goreleaser.yaml configuration been updated to remove the redundant output line under docker_signs. This change simplifies the configuration without changing the functionality of Docker image signing. The password for the Docker registry is still sourced from the 'COSIGN_PWD' environment variable.
2024-03-14 00:13:08 +01:00
ac53637f86
Add Docker signing in .goreleaser.yaml
The .goreleaser.yaml configuration has been updated to include Docker image signing. This is accomplished by utilizing 'docker_signs' and specifying 'artifacts: all', allowing to process and authenticate all output Docker images. The user's password for the Docker registry is taken from the environment variable 'COSIGN_PWD'.
2024-03-14 00:11:19 +01:00
0ec81e16cc
Simplify Dockerfile setup
The Dockerfile has been streamlined to remove unnecessary steps and over-complications. Previously the setup involved building in a separate stage and copying files over, which has now been simplified to just copying the necessary executable to the scratch container and specifying the entry point.
2024-03-14 00:03:04 +01:00
f871dfb82b
Add build_flag_templates to .goreleaser.yaml
Extended the .goreleaser.yaml configuration with build_flag_templates options for the Docker image. These new flags introduce image labels for open containers, which provides more detailed image information including the creation date, project name, revision, and version.
2024-03-13 23:59:08 +01:00
48c352f998
Add image templates to .goreleaser.yaml
Added four Docker image templates in the .goreleaser.yaml file. The newly introduced templates specify the image tags based on the version, making it easier to handle different versions of the Docker image for the "apg-go" project.
2024-03-13 23:54:02 +01:00
48a0b6763b
Modify Docker build process and workflow
The Docker build command in the GitHub workflow file (docker.yml) now requires sudo privileges. Additionally, the Dockerfile has been expanded to not only tidy up and verify the Go modules project but also to alter the build path for the "apg-go" executable.
2024-03-13 23:45:58 +01:00
7da9c71983
Replace docker-compose with docker in GitHub Workflow
The GitHub Workflow (docker.yml) has been refactored to replace docker-compose with docker. This involves changes in the installation instructions and the commands to build and test the Docker image. This simplifies the workflow and allows the use of standard Docker commands instead of docker-compose.
2024-03-13 23:41:01 +01:00
7ee5632405
Refactor docker-compose installation in GitHub Workflow
Docker-compose installation has been moved in the GitHub Workflow (docker.yml) from the "test" to the "build" phase. This change ensures docker-compose is installed early on, making it available throughout the entire process. The steps include updating the package list, installing docker-compose, and confirming its installation.
2024-03-13 23:37:38 +01:00
a9b0f3b32b
Add docker-compose installation to GitHub Workflow
The GitHub Workflow (docker.yml) now includes a step for installing docker-compose. This addition ensures that docker-compose is available within the Docker container, which is necessary for performing complex multi-container tasks. The installation process involves updating the package list, installing docker-compose, and verifying its location.
2024-03-13 23:36:37 +01:00
6987fdd8af
Relocate Docker build and push process to GitHub Workflow
The Docker image creation and pushing procedures have been moved from the goreleaser.yaml file to a separate GitHub Workflow file docker.yml. This shift gives a more granular control over the Docker image build and push operations with specific GitHub Actions. Also, added the Dockerfile instructions and docker-files for image building to cope up with the changed Docker process.
2024-03-13 23:34:23 +01:00
b9d48ffd15 Updated .goreleaser 2024-03-13 23:23:09 +01:00
53a9410f4c Updated .goreleaser config 2024-03-13 23:15:12 +01:00
2100a2a227 Added cosign key 2024-03-13 23:05:16 +01:00
45696a70f8 Merge pull request 'More release options' (#57) from feat/more_release_options into main
Reviewed-on: #57
2024-03-13 22:59:53 +01:00
030fd458e5 Added dockerhub config 2024-03-13 22:59:22 +01:00
e95c69e41f Added SPDX license header to Dockerfile 2024-03-13 22:45:25 +01:00
8a6507b5f2 Updated .goreleaser 2024-03-13 22:42:30 +01:00
e5f97ee2f0 Updated .goreleaser and added Dockerfile and LICENSE 2024-03-13 22:36:46 +01:00
ddb7b678eb
Update .goreleaser.yaml with Docker image template
A new Docker image template has been added to the .goreleaser.yaml file. Specifically, the image template 'wneessen/apg-go' was introduced under the 'dockers' configuration, allowing smoother configuration for Docker-based implementations.
2024-03-13 21:30:13 +01:00
5a341ec805 Merge pull request 'More config options' (#56) from more_config_options into main
Reviewed-on: #56
2024-03-13 21:28:38 +01:00
83e910bdda
Update min character options and remove HIBP check
We've added new configuration options for setting minimum counts of lowercase, numeric, special, and uppercase characters in passwords. The HIBP check feature has also been removed due to redundancy. Note: High values for these character minimums may lead to long calculation times.
2024-03-13 21:23:56 +01:00
d6cfc79cf2
Add new configuration options and tests
This commit introduces new methods to enable HIBP checks, exclude specific characters, and set a fixed password length in the password generator configuration. It also includes tests to verify that these new options work correctly in the password configuration.
2024-03-13 20:48:03 +01:00
d4d2067cbf
Add Discord and REUSE badges to README
This commit introduces two new badges to the README file. The first badge directs users to the project's Discord server, promoting community contributions. The second badge verifies that the project complies with REUSE software recommendations, ensuring users of the project's commitment to best practices in software development.
2024-03-12 22:52:25 +01:00
c7ba329b9b Updated .goreleaser 2024-03-12 22:05:19 +01:00
0a8d201d8f Updated .gitignore 2024-03-12 21:55:50 +01:00
f3a9ead070 Updated goreleaser config 2024-03-12 21:55:08 +01:00
b9b93905b2 Merge pull request 'v2 refactor' (#54) from v2 into main
Reviewed-on: #54
2024-03-12 21:39:55 +01:00
ce3f8effa2
Remove codecov workflow for Forgejo 2024-03-12 21:35:58 +01:00
96fa3c53fb
Add coverage report path to sonar properties
Updated the sonar-project.properties file to include a path for the Go coverage report. This path will allow Sonar to access the coverage report created by Go tests, improving overall project testing and coverage monitoring.
2024-03-12 21:31:26 +01:00
239501e83b
Refactor error formatting and update Go version in linter config
Reformatted error messages to use %w for improved error handling in "random.go", and updated the used Go version in the ".golangci.toml" file. Also, removed some unnecessary lines in "random_test.go" and improved the layout of an array in "koremutake.go".
2024-03-12 21:23:15 +01:00
8fef635664
Update badges links in README.md
This commit updates the existing badge references on the README.md file. The previous badge links were pointing to GitHub locations, these are being changed to point to 'src.neessen.cloud', potentially reflecting a move away from GitHub.
2024-03-12 21:02:25 +01:00
f26ca059af
Add MIT and CC0-1.0 license files
This commit adds two new license files, MIT.txt and CC0-1.0.txt under the LICENSES directory. These licenses provide a clear understanding of the permissions and restrictions applied to the software which can be important for both developers and users.
2024-03-12 20:59:37 +01:00
79f921f9ad
Add .gitgnore and SPDX headers in several files
This commit introduces the .gitignore configuration file and adds SPDX headers to several files including test and documentation files. The headers provide license information in a standardized format which can be easily picked up by automated tools for license compliance checks. Additionally, it deleted a .idea/.gitignore file, which is a project specific IDE configuration file not necessary for the repository. It also introduced a README.md file providing more insightful information about the project.
2024-03-12 20:59:07 +01:00
f2a57cf46f
Update flag order and add -mX and -p flags in apg.go
The flag assignments in apg.go have been updated to be in alphabetic order and two new flags, `-mX` and `-p`, have been added. This change improves readability and makes maintaining the code easier, while not affecting the algorithm's functionality.
2024-03-12 20:43:48 +01:00
d521defa38
Rearrange flag assignments for readability in apg.go
The flag assignments in the apg.go file have been rearranged and organized in alphabetical order by their first letter for better readability and easy management. The logic remains unaffected, but the changes should improve the overall code aesthetic and maintainability.
2024-03-12 20:41:24 +01:00
2143ca99f5
Added option to exclude certain characters in password generation
The code now supports the configuration parameter 'ExcludeChars', which gives users the ability to specify particular characters that should not be included in the generated passwords. This addition was fully implemented both on config.go and random.go, while the relevant option flag was also added to apg.go for user interaction.
2024-03-12 20:31:27 +01:00
2022e0953d Added goreleaser 2024-03-12 20:13:41 +01:00
1eb4cf37e2
Added version display feature in apg.go
An option flag has been added to apg.go, which allows users to check the version of the script. When activated, the script displays the version and exits. It also provides OS and architecture information, outputted to stderr for user convenience.
2024-03-12 20:12:32 +01:00
c5caab0066
Add tests for HasBeenPwned function
Introduced unit tests for the HasBeenPwned function in the hibp_test.go file. These tests consist of scenarios with both secured and compromised passwords, improving the function's reliability and error handling capabilities.
2024-03-12 19:09:51 +01:00
87f93ddbc6
Add HIBP password check functionality
Implemented HIBP password check feature which will crosscheck generated passwords with the HIBP pwned passwords database. This functionality enhances security by not recommending potentially compromised passwords. A new flag, CheckHIBP has been added to enable or disable this feature.
2024-03-12 19:00:21 +01:00
4b0437d3b1
Add pronunciation tests in spelling_test.go
Added "TestPronounce" function in spelling_test.go file to ensure pronunciation mechanism works as expected. The function tests various cases including no syllables, single syllable, multiple syllables, and non-Koremutake syllables.
2024-03-12 18:43:51 +01:00
fefb2557fc
Refactor spelling of "Pronounceable" and introduce syllable spelling feature
The spelling of "Pronounceable" has been adjusted throughout the code. Moreover, a new functionality for producing pronounceable passwords spelled as correlating syllables has been integrated. This includes relevant changes to password character sets used for pronounceable passwords and enhancements to test this new feature.
2024-03-12 18:28:01 +01:00
90ff88de41
Implement additional tests for password generation functionality
In this commit, several new tests have been introduced into random_test.go. These include cases for generating pronounceable passwords, testing minimum requirement conditions, and checking different password algorithms. This provides more comprehensive testing coverage and confirms the expected functionality of password generator methods.
2024-03-12 17:49:26 +01:00
8cb702c932
Add password length and coin flip tests in random_test.go
Added detailed test cases for handling password length and coin flip functionality in random_test.go. These additional unit tests cover various conditions for password lengths, and ensure that 'generateCoinFlip' behaves as expected across multiple invocations.
2024-03-12 16:57:48 +01:00
2973ff4c39
Remove unnecessary comments in random_test.go
Removed redundant comments in random_test.go, specifically in TestGetCharRangeFromConfig function. This change simplifies and tidies the code, while maintaining its comprehensibility and the clarity of the test cases structure.
2024-03-12 16:43:20 +01:00
a03f170738
Add TestSpell function in spelling_test.go
Added a new unit test, TestSpell, to the spelling_test.go file. This new test safely triggers several different spell checking scenarios, from empty strings to non-alphabetical characters. As a result, the function's reliability and robustness is significantly improved.
2024-03-12 12:14:46 +01:00
45b45919c1
Add TestGetCharRangeFromConfig function in random_test.go
A comprehensive unit test, TestGetCharRangeFromConfig, has been added to the random_test.go file. This test validates the GetCharRangeFromConfig function across various scenarios and configurations. It also improves code reliability and makes the application more robust against potential issues.
2024-03-12 12:14:36 +01:00
1c22c9b8f0
Refactor error message in mode_test.go
The error message format in `ModesFromFlags()` method within `mode_test.go` has been refactored. The refactoring improved the clarity and conciseness of error reporting when the expected mode is not found during test execution.
2024-03-08 17:08:05 +01:00
72576961e6
Implement pronouncable password generation and refactor code
The new function "generatePronouncable" generates pronounceable passwords using the Koremutake syllabic representation. It is executed when 'Generate()' method is called with Algorithm set to 'AlgoPronouncable'. Additionally, significant changes were made to enhance the readability and performance of the 'GetCharRangeFromConfig' and 'checkMinimumRequirements' methods. In 'mode_test.go', the error message format has been updated for clear and concise display.
2024-03-08 17:07:55 +01:00
bd654d40b8
Refactor error messages in spelling tests
Modified the error messages in spelling tests within spelling_test.go to improve clarity and readability. These adjustments involve changing the format specifiers in the error messages of 'ConvertByteToWord' function tests to correspond with the expected data types for better error reporting.
2024-03-08 16:04:16 +01:00