Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use the github token as a parameter for reporting #1999

Open
10000-ki opened this issue Nov 18, 2023 · 4 comments
Open

Can we use the github token as a parameter for reporting #1999

10000-ki opened this issue Nov 18, 2023 · 4 comments

Comments

@10000-ki
Copy link

10000-ki commented Nov 18, 2023

when i use this action in enterprise github, Reporting is failing due to issue of access repository and 403 error returns

�so how about improving it by receiving github token as below

Jacoco Report Action

      - name: Kover Test Report
        uses: actions/jacoco-report@v1.3
        with:
          title: "Koverage"
          paths: ${{ github.workspace }}/build/kover/result.xml
          token: ${{ secrets.GITHUB_TOKEN }}
          min-coverage-overall: 40
          min-coverage-changed-files: 60
@10000-ki 10000-ki changed the title Can we deliver the github token as a parameter for reporting Can we use the github token as a parameter for reporting Nov 18, 2023
@mbg
Copy link
Member

mbg commented Nov 18, 2023

Hi @10000-ki 👋

I think what you are asking for is already possible. The CodeQL Actions all have a token input that is set to github.token by default, but can be set to something else if needed.

That being said, you should not normally need to change it from the default. Make sure there isn't a different underlying problem, such as incorrectly configured permissions for the workflow/job or missing GitHub Advanced Security access.

@mGunawardhana
Copy link

HI 👋🏻
How can I securely integrate a GitHub token as a parameter for reporting in GitHub issues within a CI/CD pipeline, ensuring both the confidentiality of the token and seamless automation of the reporting process? Are there specific authentication mechanisms, encryption practices, or GitHub API features recommended for such advanced use cases?
if you can reply me immediatly it will be very useful to me ❤️

@10000-ki
Copy link
Author

data: {
      message: 'Advanced Security must be enabled for this repository to use code scanning.',
      documentation_url: 'https://docs.github.com/enterprise-server@3.8/rest'
    }

oh i think this issue related to https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/advanced-security-must-be-enabled#about-this-error

@adityasharad
Copy link
Contributor

HI 👋🏻 How can I securely integrate a GitHub token as a parameter for reporting in GitHub issues within a CI/CD pipeline, ensuring both the confidentiality of the token and seamless automation of the reporting process? Are there specific authentication mechanisms, encryption practices, or GitHub API features recommended for such advanced use cases? if you can reply me immediatly it will be very useful to me ❤️

Hi. I think this question is very broad, and not limited to just the CodeQL analysis tool, which is our focus in this repo. I suggest looking at the following resources for practices around authenticating to the GitHub API, and using secrets within GitHub Actions workflows:

If you have further questions after that, please ask in https://github.com/orgs/community/discussions (for questions about general GitHub usage), or open a fresh issue in this repo (for questions about CodeQL) with your specific question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants