Skip to content

Allow for modifying inner-builds packages from outer-build #2221

@jviau

Description

@jviau

This issue is primarily a response to the issue of vulnerable packages being brought in as part of WorkerExtensions.csproj. Today there is no convenient way to manually update these vulnerable packages from the outer-build. This issue is to track an enhancement that will allow for modification from the outer build.

Goals

  • Provide a mechanism for extensions, or end users, to directly modify the package references used by WorkerExtensions.csproj
    • The intent is for extensions to be able to address transitive dependency CVE's from the WebJobs extension they rely on.
  • NEEDS FURTHER CONSIDERATION: Have this MSBuild-based approach be an alternative to the extension assembly attribute used today
    • There is loss of context when shifting from an attribute to the msbuild item: we need to identify which of these items we add to extension.json. Additionally, today we default to including an extension only if a trigger or binding from it is actually used.

Non Goals

  • Deprecate extension assembly attribute.
    • We will continue to support this, but we will most likely shim these assembly attributes to MSBuild items added from this work.

Preliminary Design

We will introduce a new MSBuild item group which can be used to add or update packages on the inner build.

<Project>

  <ItemGroup>
    <FunctionsExtensionsPackageReference Include="System.Net.Http" Version="4.3.4" />
  <ItemGroup>

</Project>

The above will add an explicit <PackageReference Include="System.Net.Http" Version="4.3.4" /> to the WorkerExtensions.csproj.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions