From 6e9975ae14db1a99edaea0925f6db6f79994d2ff Mon Sep 17 00:00:00 2001 From: MuriloChianfa Date: Sun, 1 Sep 2024 20:52:10 -0300 Subject: [PATCH] fixing prettier issues --- .github/workflows/codeql-analysis.yml | 60 +++++----- README.md | 165 +++++++++++++++----------- action.yml | 10 +- package.json | 1 + 4 files changed, 136 insertions(+), 100 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4237b53..f024dde 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,14 +9,14 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: 'CodeQL' on: push: - branches: [ main ] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [ main ] + branches: [main] schedule: - cron: '24 5 * * 6' @@ -32,40 +32,40 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: ['javascript'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - config-file: ./.github/codeql/codeql-config.yml - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql/codeql-config.yml + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/README.md b/README.md index 29b6f55..c528d73 100644 --- a/README.md +++ b/README.md @@ -5,22 +5,31 @@ [![GitHub Super-Linter](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml) [![CodeQL](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/codeql-analysis.yml) -Automate and streamline IonCube encoding for your PHP project under Laravel, Joomla, WordPress frameworks with this powerful GitHub Action. Encode your source code effortlessly, ensuring an extra layer of security for your proprietary codebase. +Automate and streamline IonCube encoding for your PHP project under Laravel, +Joomla, WordPress frameworks with this powerful GitHub Action. Encode your +source code effortlessly, ensuring an extra layer of security for your +proprietary codebase. ## Features -- **Seamless Integration:** Easily integrate IonCube encoding into your CI/CD workflows with a straightforward setup using this GitHub Action. +- **Seamless Integration:** Easily integrate IonCube encoding into your CI/CD + workflows with a straightforward setup using this GitHub Action. -- **Version Control:** Specify the IonCube version to use for encoding, ensuring compatibility with your project requirements. +- **Version Control:** Specify the IonCube version to use for encoding, ensuring + compatibility with your project requirements. -- **Flexible Configuration:** Customize the source and output directories, making it adaptable to various project structures. +- **Flexible Configuration:** Customize the source and output directories, + making it adaptable to various project structures. -- **Efficient Workflow:** Save time and resources by automating the encoding process, allowing you to focus on building and deploying your applications. +- **Efficient Workflow:** Save time and resources by automating the encoding + process, allowing you to focus on building and deploying your applications. ## Getting Started -- **Configure Workflow**: Copy the example workflow into your project's .github/workflows directory, adjusting parameters as needed. -- **Run Workflow**: Push your changes to trigger the IonCube encoding workflow and enjoy the automated process. +- **Configure Workflow**: Copy the example workflow into your project's + .github/workflows directory, adjusting parameters as needed. +- **Run Workflow**: Push your changes to trigger the IonCube encoding workflow + and enjoy the automated process. ### Usage @@ -36,20 +45,22 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: IonCube Encode - uses: MuriloChianfa/ioncube-encoder-action@v1.0.0 - with: - source: 'src' - output: 'encrypted' + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: IonCube Encode + uses: MuriloChianfa/ioncube-encoder-action@v1.0.0 + with: + source: 'src' + output: 'encrypted' ``` > For Laravel projects: -- **Setup Secrets**: Create a secret named IONCUBE_PASSPHRASE containing the passphrase to encode files. -- **Install composer packages**: Sometimes you need to install the composer packages before of project encode. +- **Setup Secrets**: Create a secret named IONCUBE_PASSPHRASE containing the + passphrase to encode files. +- **Install composer packages**: Sometimes you need to install the composer + packages before of project encode. ```yaml name: Encode Laravel with IonCube @@ -61,60 +72,75 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: IonCube Encode Project - uses: MuriloChianfa/ioncube-encoder-action@v1.0.0 - with: - source: 'src' - output: 'encrypted' - passphrase: ${{ secrets.IONCUBE_PASSPHRASE }} - # License file path in runtime - with-license: /opt/project/license - # Callback file path in runtime - callback-file: /opt/project/public/ioncube.php - - - name: IonCube Encode Callback File - uses: MuriloChianfa/ioncube-encoder-action@v1.0.0 - with: - source: 'src/public/ioncube.php' - output: 'encrypted/public/ioncube.php' - passphrase: ${{ secrets.IONCUBE_PASSPHRASE }} + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: IonCube Encode Project + uses: MuriloChianfa/ioncube-encoder-action@v1.0.0 + with: + source: 'src' + output: 'encrypted' + passphrase: ${{ secrets.IONCUBE_PASSPHRASE }} + # License file path in runtime + with-license: /opt/project/license + # Callback file path in runtime + callback-file: /opt/project/public/ioncube.php + + - name: IonCube Encode Callback File + uses: MuriloChianfa/ioncube-encoder-action@v1.0.0 + with: + source: 'src/public/ioncube.php' + output: 'encrypted/public/ioncube.php' + passphrase: ${{ secrets.IONCUBE_PASSPHRASE }} ``` ### Inputs -- ***trial***: Encode file with trial version of ioncube. *(default: true)* -- ***template***: The template to choose the best parameters for type of projects. *(default: php)* -- ***source***: The file or directory containing your PHP project. *(default: src)* -- ***output***: The file or directory where the encoded project will be saved. *(default: encrypted)* -- ***encoder-version***: The Ioncube encoder version. *(default: current)* -- ***php-target-version***: The PHP encoded files target version. *(default: 8.2)* -- ***arch***: Architecture of target environment runner. *(default: 64)* -- ***allow-reflection***: Name or glob to funcions or classes for allow the reflection API. *(default: false)* -- ***allow-reflection-all***: Allow the reflection API at all the PHP code. *(default: false)* -- ***encrypt***: Name or glob to files to encrypt. *(default: false)* -- ***binary***: Encode files in binary format. *(default: false)* -- ***optimize***: Level of encoding performance. *(default: more)* -- ***no-doc-comments***: Not allow doc comments on encoded files. *(default: false)* -- ***without-loader-check***: Disable the ioncube loader installation verification. *(default: false)* -- ***preamble-file***: File for insert into header of all encoded files. *(default: false)* -- ***passphrase***: Text to identify and encode the project unically. *(default: false)* -- ***license-check***: Mode of license validation for encoded files. *(default: auto)* -- ***with-license***: The license file path at runtime environment. *(default: false)* -- ***callback-file***: File to validate manually when license is invalid. *(default: false)* +- **_trial_**: Encode file with trial version of ioncube. _(default: true)_ +- **_template_**: The template to choose the best parameters for type of + projects. _(default: php)_ +- **_source_**: The file or directory containing your PHP project. _(default: + src)_ +- **_output_**: The file or directory where the encoded project will be saved. + _(default: encrypted)_ +- **_encoder-version_**: The Ioncube encoder version. _(default: current)_ +- **_php-target-version_**: The PHP encoded files target version. _(default: + 8.2)_ +- **_arch_**: Architecture of target environment runner. _(default: 64)_ +- **_allow-reflection_**: Name or glob to funcions or classes for allow the + reflection API. _(default: false)_ +- **_allow-reflection-all_**: Allow the reflection API at all the PHP code. + _(default: false)_ +- **_encrypt_**: Name or glob to files to encrypt. _(default: false)_ +- **_binary_**: Encode files in binary format. _(default: false)_ +- **_optimize_**: Level of encoding performance. _(default: more)_ +- **_no-doc-comments_**: Not allow doc comments on encoded files. _(default: + false)_ +- **_without-loader-check_**: Disable the ioncube loader installation + verification. _(default: false)_ +- **_preamble-file_**: File for insert into header of all encoded files. + _(default: false)_ +- **_passphrase_**: Text to identify and encode the project unically. _(default: + false)_ +- **_license-check_**: Mode of license validation for encoded files. _(default: + auto)_ +- **_with-license_**: The license file path at runtime environment. _(default: + false)_ +- **_callback-file_**: File to validate manually when license is invalid. + _(default: false)_
> [!IMPORTANT] > -> Make sure to ignore the commits for encrypted files. -> After encrypt your project, test them for make sure your correct functionality. +> Make sure to ignore the commits for encrypted files. After encrypt your +> project, test them for make sure your correct functionality. ## Example -Explore a complete example of a workflow that utilizes this action in the example project. +Explore a complete example of a workflow that utilizes this action in the +example +project. ## Testing this package @@ -127,24 +153,27 @@ npm run package ### Dependencies -- *NodeJS 20.8.0 or higher.* -- *NPM 10.1.0 or higher.* +- _NodeJS 20.8.0 or higher._ +- _NPM 10.1.0 or higher._ ## Commitment to Quality + During package development, try as best as possible to embrace good design and development practices to try to ensure that this package is as good as it can be. The checklist for package development includes: -- ✅ Have no Lint warnings throughout all code. -- ✅ Include comprehensive documentation in README.md. +- ✅ Have no Lint warnings throughout all code. +- ✅ Include comprehensive documentation in README.md. ## Contributions -We welcome contributions! Feel free to open issues for suggestions or bug reports, and pull requests are highly appreciated. +We welcome contributions! Feel free to open issues for suggestions or bug +reports, and pull requests are highly appreciated. ## Security -If you discover any security related issues, please email murilo.chianfa@outlook.com instead of using the issue tracker. +If you discover any security related issues, please email +murilo.chianfa@outlook.com instead of using the issue tracker. ## Credits @@ -153,8 +182,10 @@ If you discover any security related issues, please email murilo.chianfa@outlook ## License -This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details. +This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) +file for details. ## Acknowledgments -Special thanks to IonCube for providing robust encoding technology. +Special thanks to IonCube for providing +robust encoding technology. diff --git a/action.yml b/action.yml index 45c6f3a..38e3b7f 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,7 @@ name: 'ioncube-encoder-action' -description: 'Github action for integrate your project encode with ioncube into your CI/CD pipeline.' +description: + 'Github action for integrate your project encode with ioncube into your CI/CD + pipeline.' author: 'MuriloChianfa' inputs: @@ -10,7 +12,8 @@ inputs: default: false type: boolean template: - description: 'The template to choose the best parameters for type of projects' + description: + 'The template to choose the best parameters for type of projects' required: false default: laravel type: choice @@ -60,7 +63,8 @@ inputs: # Reflection API allow-reflection: - description: 'Name or glob to funcions or classes for allow the reflection API' + description: + 'Name or glob to funcions or classes for allow the reflection API' required: false default: '' type: string diff --git a/package.json b/package.json index fcc06c6..a0b1e43 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "url": "https://github.com/MuriloChianfa/ioncube-encoder-action/issues" }, "keywords": [ + "Actions", "Ioncube", "Laravel", "PHP"