Injecting Repository into Custom Action Filter using Unity

create UnityFilterAttributeFilterProvider .cs class
//https://github.com/jakubgarfield/Bonobo-Git-Server/blob/master/Bonobo.Git.Server/FilterProviders/UnityFilterAttributeFilterProvider.cs
public class UnityFilterAttributeFilterProvider : FilterAttributeFilterProvider
{

private readonly IUnityContainer _container;

public UnityFilterAttributeFilterProvider(IUnityContainer container)
{
_container = container;
}

protected override IEnumerable<FilterAttribute> GetControllerAttributes(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
{
var attributes = base.GetControllerAttributes(controllerContext, actionDescriptor).ToList();
foreach (var attribute in attributes)
{
_container.BuildUp(attribute.GetType(), attribute);
}

return attributes;
}

protected override IEnumerable<FilterAttribute> GetActionAttributes(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
{
var attributes = base.GetActionAttributes(controllerContext, actionDescriptor).ToList();
foreach (var attribute in attributes)
{
_container.BuildUp(attribute.GetType(), attribute);
}

return attributes;
}
}

In global.asax
protected void Application_Start() {
// ...

var oldProvider = FilterProviders.Providers.Single(
f => f is FilterAttributeFilterProvider
);
FilterProviders.Providers.Remove(oldProvider);

var container = new UnityContainer();
var provider = new UnityFilterAttributeFilterProvider(container);
FilterProviders.Providers.Add(provider);

// ...
}

Since Unity is not instantiating the Filters, it cannot inject them. You would have to resort to service locator pattern such as in the following:
Authenticate is the custom action filter where I am injecting IAuthenticate and ILibrary repository
public class Authenticate : AuthorizeAttribute
{
public IAuthenticate AuthenticateLibrary { get; private set; }

public ILibrary BaseLibrary { get; private set; }

public Authenticate()
{
AuthenticateLibrary = DependencyResolver.Current.GetService<IAuthenticate>();
BaseLibrary = DependencyResolver.Current.GetService<ILibrary >();
}
...
}