MobSF / mobsfscan

mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code. Supports Java, Kotlin, Swift, and Objective C Code. mobsfscan uses MobSF static analysis rules and is powered by semgrep and libsast pattern matcher.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource not accessible by integration

mvineza opened this issue · comments

I'm encountering this error.

Run github/codeql-action/upload-sarif@v2
  with:
    sarif_file: results.sarif
    checkout_path: /home/runner/work/test-ghas-ios/test-ghas-ios
    token: ***
    matrix: null
    wait-for-processing: true
RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/github/codeql-action/v[2](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:2)/node_modules/@octokit/request/dist-node/index.js:66:2[3](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:3)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Job.doExecute (/home/runner/work/_actions/github/codeql-action/v2/node_modules/bottleneck/light.js:[4](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:4)0[5](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:5):18) {
  status: 403,
  headers: {
    'access-control-allow-origin': '*',
    'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
    connection: 'close',
    'content-encoding': 'gzip',
    'content-security-policy': "default-src 'none'",
    'content-type': 'application/json; charset=utf-8',
    date: 'Thu, 09 Feb 2023 03:32:1[6](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:6) GMT',
    'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
    server: 'GitHub.com',
    'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
    'transfer-encoding': 'chunked',
    vary: 'Accept-Encoding, Accept, X-Requested-With',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'deny',
    'x-github-api-version-selected': '2022-11-28',
    'x-github-media-type': 'github.v3; format=json',
    'x-github-request-id': 'F402:66AF:1[7](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:7)4C779:2F9AE1C:63E46940',
    'x-ratelimit-limit': '1000',
    'x-ratelimit-remaining': '950',
    'x-ratelimit-reset': '1675915403',
    'x-ratelimit-resource': 'core',
    'x-ratelimit-used': '50',
    'x-xss-protection': '0'
  },
  request: {
    method: 'PUT',
    url: 'https://api.github.com/repos/mvineza/test-ghas-ios/code-scanning/analysis/status',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'CodeQL-Action/2.2.3 octokit-core.js/3.1.2 Node.js/16.16.0 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-[8](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:9)'
    },
    body: '{"workflow_run_id":41306[9](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:10)08[10](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:11),"workflow_name":"mobsfscan sarif","job_name":"mobsfscan","analysis_key":".github/workflows/mobfs.yml:mobsfscan","commit_oid":"4f5e[11](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:12)f4c65d7d866ffa53eb3c4e72dd1634b384","ref":"refs/heads/main","action_name":"upload-sarif","action_ref":"v2","action_oid":"unknown","started_at":"2023-02-09T03:32:[15](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:16).645Z","action_started_at":"[20](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:21)[23](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:24)-02-09T03:[32](https://github.com/mvineza/test-ghas-ios/actions/runs/4130690810/jobs/7137620369#step:4:33):15.645Z","status":"starting","testing_environment":"","runner_os":"Linux","action_version":"2.2.3","matrix_vars":"null","runner_arch":"X64"}',
    request: { agent: [Agent], hook: [Function: bound bound register] }
  },
  documentation_url: 'https://docs.github.com/rest'
}
Error: Resource not accessible by integration

Here is my workflow file.

name: mobsfscan sarif
on:
  push:
    branches: [ master, main ]
  pull_request:
    branches: [ master, main ]

jobs:
  mobsfscan:
    runs-on: ubuntu-latest
    name: mobsfscan code scanning
    steps:
    - name: Checkout the code
      uses: actions/checkout@v2
    - name: mobsfscan
      uses: MobSF/mobsfscan@main
      with:
        args: '. --sarif --output results.sarif || true'
    - name: Upload mobsfscan report
      uses: github/codeql-action/upload-sarif@v2
      with:
        sarif_file: results.sarif

Works fine at my end for https://github.com/MobSF/diva-android/blob/master/.github/workflows/mobsfscan_sarif.yaml. Probably a Github issue at your end.

Screenshot 2023-02-09 at 2 42 13 PM