Git Product home page Git Product logo

pipelines-appservice-lib's Introduction

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

pipelines-appservice-lib's People

Contributors

20shivangi avatar ahmelsayed avatar aksm-ms avatar amrutakawade avatar asranja avatar bgrainger avatar chunye avatar dannysongg avatar dependabot[bot] avatar kumaraksh1 avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar patelchandni avatar sgollapudi77 avatar shpraka avatar suaggar avatar zijchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pipelines-appservice-lib's Issues

actions-secret-parser: Invalid 'main' field in package.json

When running the azure/webapps-deploy@v2 action, I received the following error:

(node:2000) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/runner/work/_actions/azure/webapps-deploy/v2/node_modules/actions-secret-parser/package.json' of 'lib/index.js'. Please either fix that or report it to the module author

The configuration seems correct in this repository because /packages/secret-parser/tsconfig.json outputs into a /lib directory and the 'main' field in package.json is referencing that directory.

The problem is that the npm package actions-secret-parser is different from the configuration. index.js is in the root directory, the /lib directory does not exist. See https://www.npmjs.com/package/actions-secret-parser?activeTab=explore

UserAgent not defined when posting to zipdeploy

Tested on both webapp-action and functions-action.
The Github Action POST api/zipdeploy request does not contain proper UserAgent field.
in webClient.ts, process.env.AZURE_HTTP_USER_AGENT is undefined.

Kusto Table:
image

Suggestion:
Should lazily initialize webClient. Suspect that the environment variable is propagated later than webClient initialization.

Kudu call to get app settings is logging secrets

console.log(`##[debug]getAppSettings. Data: ${JSON.stringify(response)}`);

I just started working with github actions and noticed this call to getAppSettings is logging the response in its entirety into the actions console. This is exposing what would otherwise be secret app settings only accessible from the azure portal. In my particular deployment it is only using this call to warm up kudu before calling the zip deploy.

Could this be configured to be silent? Or is there a different call that could be used for warming up kudu? I notice this call is also used where appsettings are actually needed however it shouldn't log them by default in that case either.

findfiles doesnt seem to work with linux relative paths

When trying to use appservice-actions Webapp deployer, I tried using the package syntax with a relative path (or variable) and glob (example: ./target/*.jar or ${GITHUB_WORKSPACE/target/*.jar}) and it was not able to pick up the package that I wanted.

    - uses: azure/appservice-actions/webapp@master
      with: 
        app-name: example
        publish-profile: ${{ secrets.azureWebAppPublishProfile }}
        package:  ./target/example*.jar 

When I set it to a direct path with glob it worked.

    - uses: azure/appservice-actions/webapp@master
      with: 
        app-name: example
        publish-profile: ${{ secrets.azureWebAppPublishProfile }}
        package:  /home/runner/work/example/example/target/example*.jar 

I was able to trace it back to this package and I believe there is something wrong in the utility not respecting linux relative paths or environment variables in the path.

Fails to find the function App from time to time

Azure/functions-action#116

The following "app doesn't exist" error appears even if the function app is already there and exists for hours.

Error: Resource func-my-function doesn't exist.
    at Function.<anonymous> (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility.js:21:23)
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Error is generated from the code here:

  1. if(!filteredResources || filteredResources.length == 0) {
    throw new Error('ResourceDoesntExist');
    }
  2. var httpRequest: webClient.WebRequest = {
    method: 'GET',
    uri: this._client.getRequestUri('//subscriptions/{subscriptionId}/resources', {},
    [`$filter=resourceType EQ \'${encodeURIComponent(resourceType)}\' AND name EQ \'${encodeURIComponent(resourceName)}\'`], '2016-07-01')
    };

Bump the version of `xmldom` for `actions-secret-parser`

xmldom<=0.6.0 allows multiple root nodes in a DOM is regarded as a critical vulnerability scanned by GitHub Dependabot.

Impact

xmldom parses XML that is not well-formed because it contains multiple top level elements, and adds all root nodes to the childNodes collection of the Document, without reporting any error or throwing.
This breaks the assumption that there is only a single root node in the tree, which led to https://nvd.nist.gov/vuln/detail/CVE-2022-39299 and is a potential issue for dependents.

Patches

Update to @xmldom/xmldom@~0.7.7, @xmldom/xmldom@~0.8.4 (dist-tag latest) or @xmldom/xmldom@>=0.9.0-beta.4 (dist-tag next).

Please bump the version of xmldom, otherwise anyone depends on actions-secret-parser will be affected by this vulnerability.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.